Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in solve.default(VC) : system is computationally singular: reciprocal condition number = 3.40196e-17 #15

Closed
Virginienael opened this issue Oct 17, 2019 · 2 comments

Comments

@Virginienael
Copy link

Virginienael commented Oct 17, 2019

Dear,
Thank you again for this software. Unfortunately I am having trouble getting it to run on my own data. When I run the code below , I get the following error message from JointModel(): Error in solve.default(VC) : system is computationally singular: reciprocal condition number = 3.40196e-17 , Error: cannot allocate vector of size 86.8 Gb,
Error in lme.formula(obs ~ IND_SEVVP0 + AUDI0_C + SEXE + CENTRE + DIPNIV0C + :
nlminb issue, code d'convergence error = 1 message = false convergence (8)

Error in optim(thetas, opt.survWB, gr.survWB, method = "BFGS", control = list(maxit = if (it < : unfinished value provided by optim
Warning message:
In jointModel(lme_Isa_30_M4VP2, Cox_Isa_30_M4VPquad, timeVar = "T", :
infinite or missing values in Hessian at convergence.

### Please, if someone could help me;; i'm really stuck

Linear mixed model

MixteISAVP4 <- Base_ISA[(!is.na(Base_ISA$IND_SEVVP0) & (!is.na(Base_ISA$AUDI0_C)) & (!is.na(Base_ISA$DIPNIV0C))
& (!is.na(Base_ISA$VIVRE_SEUL0)) & (!is.na(Base_ISA$REVENU0C)) & (!is.na(Base_ISA$FUME0))
& (!is.na(Base_ISA$BMI0C)) & (!is.na(Base_ISA$ATCDCAR)) & (!is.na(Base_ISA$ATCDAVC))
& (!is.na(Base_ISA$HTA0_1)) & (!is.na(Base_ISA$DEPRES0C)) & (!is.na(Base_ISA$DIABBIS0C))
& (!is.na(Base_ISA$TRIGLY0C)) & (!is.na(Base_ISA$APOE4C)) & (!is.na(Base_ISA$HYPCT024C))), ]

CoxISA4$DELAIS<- CoxISA4$DELAIS/365
MixteISAVP4$T <- MixteISAVP4$T/365

ctrl <- lmeControl(opt='optim');
lme_Isa_30_M4VP2 <- lme(obs ~ IND_SEVVP0 + AUDI0_C + SEXE + CENTRE + DIPNIV0C + Prem + Age65 + VIVRE_SEUL0 + REVENU0C +
FUME0 + BMI0C + ATCDAVC + ATCDCAR + HTA0_1 + DEPRES0C + DIABBIS0C + TRIGLY0C +
APOE4C + HYPCT024C + T + I(T^2) +
IND_SEVVP0T + AUDI0_CT + SEXET + CENTRET + DIPNIV0CT + Age65T + DIABBIS0CT + APOE4CT +
IND_SEVVP0I(T^2) + AUDI0_CI(T^2) + SEXEI(T^2) + CENTREI(T^2) + DIPNIV0CI(T^2) + Age65I(T^2) + DIABBIS0CI(T^2) + APOE4CI(T^2),
random = ~ T + I(T^2) | NUM, method="ML", control=ctrl, na.action=na.omit, data = MixteISAVP4)
#summary(lme_Isa_30_M4VP2)

Cox

CoxISA4 <- MixteISAVP4[!duplicated(MixteISAVP4$NUM), ] # passe en 1 ligne par sujet

Cox_Isa_30_M4VPquad <- coxph(Surv(DELAIS, INDICDP) ~ IND_SEVVP0 + AUDI0_C + SEXE + CENTRE + DIPNIV0C + Prem + Age65
+ VIVRE_SEUL0 + REVENU0C + FUME0 + BMI0C + ATCDAVC + ATCDCAR + HTA0_1 + DEPRES0C
+ DIABBIS0C + TRIGLY0C + APOE4C + HYPCT024C, data = CoxISA4, x = TRUE, model=true)
#Cox_Isa_30_M4VPquad

JOINT MODEL

ctrljm<-list(iter.EM=500)
fitJOINTvalue_ISA30_M4VPquad <- jointModel(lme_Isa_30_M4VP2,
Cox_Isa_30_M4VPquad,
timeVar = "T",
method="Cox-PH-GH",
verbose=TRUE,
control=ctrljm)

#control = list(GHk = 3, lng.in.kn=1))

fitJOINTvalue_ISA30_M4VPquad <- jointModel(lme_Isa_30_M4VP2,
Cox_Isa_30_M4VPquad,
timeVar = "T",
method = "spline-PH-aGH")

fitJOINTvalue_ISA30_M4VPquad <- jointModel(lme_Isa_30_M4VP2,
Cox_Isa_30_M4VPquad,
timeVar = "T",
method = "piecewise-PH-aGH")

summary(fitJOINTvalue_ISA30_M4VPquad)

jointFit.aids3 <- jointModel(lme_Isa_30_M4VP2, Cox_Isa_30_M4VPquad,
timeVar = "T", method = "piecewise-PH-aGH", GHk = 3)

jointFit.aids6 <- jointModel(lme_Isa_30_M4VP2, Cox_Isa_30_M4VPquad,
timeVar = "T", method = "piecewise-PH-aGH", GHk = 6)

jointFit.aids9 <- jointModel(lme_Isa_30_M4VP2, Cox_Isa_30_M4VPquad,
timeVar = "T", method = "piecewise-PH-aGH", GHk = 9)

@jrmie
Copy link

jrmie commented Oct 31, 2019

I am not sure to help because you got several errors but for the following error message

  • Error in solve.default(VC) : system is computationally singular: reciprocal condition number = 3.40196e-17

I fixed it by scaling the values of the outcome with a standard transformation ~N(0, 1)
You should also check if you have non-finite values (Inf) in your dataset and remove it

@Virginienael
Copy link
Author

Virginienael commented Oct 31, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants