. Advertisement .
..3..
. Advertisement .
..4..
As advised, I used some code samples in another forum, but it could not improve the problem. My question is the “error in meem(object, conlin, control$niterem) : singularity in backsolve at level 0, block 1” in r – How to solve it? The command line is:
data.frame': 972 obs. of 7 variables:
$ data_mTBS : num 20.3 22.7 0 47.8 58.7 ...
$ data_tooth: num 1 1 1 1 1 1 1 1 1 1 ...
$ Adhesive : Factor w/ 4 levels "C-SE2","C-UBq",..: 2 2 2 2 2 2 2 2 2 2 ...
$ Approach : Factor w/ 2 levels "ER","SE": 1 1 1 1 1 1 1 1 1 1 ...
$ Aging : Factor w/ 2 levels "1w","6m": 1 1 1 1 1 1 2 2 2 2 ...
$ data_name : Factor w/ 40 levels "C-SE2-1","C-SE2-10",..: 11 11 11 11 11 11 11 11 11 11 ...
$ wait : Factor w/ 2 levels "no","yes": 1 1 1 1 1 1 1 1 1 1 ...
head(Data)
data_mTBS data_tooth Adhesive Approach Aging data_name wait
1 20.27 1 C-UBq ER 1w C-UBq-1 no
2 22.73 1 C-UBq ER 1w C-UBq-1 no
3 0.00 1 C-UBq ER 1w C-UBq-1 no
4 47.79 1 C-UBq ER 1w C-UBq-1 no
5 58.73 1 C-UBq ER 1w C-UBq-1 no
6 57.02 1 C-UBq ER 1w C-UBq-1 no
LME_01<-lme(data_mTBS ~ Adhesive*Approach*Aging*wait, na.action=na.exclude,data = Data, random = ~ 1|data_name);
contrast_Aging<-contrast(LME_01,a = list(Aging =c("1w"),Adhesive = levels(Data$Adhesive),Approach = levels(Data$Approach) ),b = list(Aging =c("6m"), Adhesive = levels(Data$Adhesive),Approach = levels(Data$Approach)))
c1<-as.matrix(contrast$X)
Contrastsi2<-summary(glht(LME_01, c1))
contrast_Approach<-contrast(LME_01,
a = list(Approach = c("SE"), Aging =levels(Data$Aging) ,Adhesive = levels(Data$Adhesive)),
b = list(Approach = c("ER"), Aging =levels(Data$Aging) ,Adhesive = levels(Data$Adhesive)))
c2<-as.matrix(contrast$X)
Contrastsi3<-summary(glht(LME_01, c2))
and the result:
Error in MEEM(object, conLin, control$niterEM) : Singularity in
backsolve at level 0, block 1
What does the message mean? Can you advise me to fix it? If you have other better answers, leave them in the answer box below.
The cause: Compared to many other R modeling functions,
lme
is a little more ignorant or stubborn. These routines either directly notify you when confounded fixed effects are present or discard some of them for you. That is the cause of the “error in meem(object, conlin, control$niterem) : singularity in backsolve at level 0, block 1”.You’ll see that knowing
wait=="no"
is equivalent to knowingAdhesive=="C-UBq"
Solution:
Using
lme4::lmer
will help you.