[R] trouble with nlme: Error in MEEM() : Singularity in backsolve at level 0, block 1

2,330 views
Skip to first unread message

Robert Lynch

unread,
Oct 5, 2013, 9:11:37 PM10/5/13
to R help
I am trying to fit my data, attached, with the following model

CutOff <- 0

fit.full <- lme(fixed= zGrade ~ Rep + ISE +Yfrm7A +Ufrm7A +Female +White
+HSGPA +MATH +AP_TOTAL +Years +Course +
Course*Rep + Course*ISE +Course*Yfrm7A+Course*Ufrm7A
+Course*Female +Course*White +Course*HSGPA +Course*MATH +Course*AP_TOTA
L+Course*Years,
random= ~1|SID,
data = Master.complete[Master.complete$GRADE >= CutOff,])
I get the following error
Error in MEEM(object, conLin, control$niterEM) :
Singularity in backsolve at level 0, block 1


when I take out
+Course*Yfrm7A+Course*Ufrm7A
and just use
fit.full <- lme(fixed= zGrade ~ Rep + ISE +Yfrm7A +Ufrm7A +Female +White
+HSGPA +MATH +AP_TOTAL +Years +Course +
Course*Rep + Course*ISE
+Course*Female+Course*White+Course*HSGPA+Course*MATH+Course*AP_TOTAL+Course*Years,
random= ~1|SID,
data = Master.complete[Master.complete$GRADE >= CutOff,])
I don't get an error

I think this is because when Course == P7A Yfrm7A==Ufrm7A==0. I am not
sure how to work around this. any suggestions would be welcome.

[[alternative HTML version deleted]]

______________________________________________
R-h...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Uwe Ligges

unread,
Oct 6, 2013, 10:44:03 AM10/6/13
to Robert Lynch, R help


On 06.10.2013 03:11, Robert Lynch wrote:
> I am trying to fit my data, attached, with the following model
>
> CutOff <- 0
>
> fit.full <- lme(fixed= zGrade ~ Rep + ISE +Yfrm7A +Ufrm7A +Female +White
> +HSGPA +MATH +AP_TOTAL +Years +Course +
> Course*Rep + Course*ISE +Course*Yfrm7A+Course*Ufrm7A
> +Course*Female +Course*White +Course*HSGPA +Course*MATH +Course*AP_TOTA
> L+Course*Years,
> random= ~1|SID,
> data = Master.complete[Master.complete$GRADE >= CutOff,])
> I get the following error
> Error in MEEM(object, conLin, control$niterEM) :
> Singularity in backsolve at level 0, block 1
>
>
> when I take out
> +Course*Yfrm7A+Course*Ufrm7A
> and just use
> fit.full <- lme(fixed= zGrade ~ Rep + ISE +Yfrm7A +Ufrm7A +Female +White
> +HSGPA +MATH +AP_TOTAL +Years +Course +
> Course*Rep + Course*ISE
> +Course*Female+Course*White+Course*HSGPA+Course*MATH+Course*AP_TOTAL+Course*Years,
> random= ~1|SID,
> data = Master.complete[Master.complete$GRADE >= CutOff,])
> I don't get an error
>
> I think this is because when Course == P7A Yfrm7A==Ufrm7A==0.

Hmmmm, actually it does not make sense to include constant variables in
your model. Please talk to your supervisor, this i not a problem with R
but about understanding the model.

Best,
Uwe Ligges
Reply all
Reply to author
Forward
0 new messages