Skip to content
Prev 992 / 20628 Next

Error when fitting with nlme

I'm getting the following error message

Error in nlmeCall[[i]] <- NULL : subscript out of bounds

when running the following non-linear mixed-effects model:
I'm clueless about what the error message means. Does it have anything
to do with the NA's problem indicated as below?
Error in numericDeriv(form[[3]], names(ind), env) :
  Missing value or an infinity produced when evaluating the model
In addition: Warning message:
In log(-coef(lm(log(ydiff) ~ x, data = xy))[2]) : NaNs produced
Call:
  Model: fCR ~ SSasymp(Tr, Asym, R0, lrc) | subj
   Data: www

Coefficients:
        Asym        R0       lrc
S1 0.9430772 0.7075430 -4.617628
S2 0.9810034 0.0604899 -3.356152
S3 0.9851586 0.5392042 -3.030196
S4 1.6158708 0.8594590 -7.742318
S5        NA        NA        NA
S6 0.8411017 0.9881358 -3.726827

Degrees of freedom: 122 total; 107 residual
Residual standard error: 0.09946001

And it hangs there forever when I run the following
However even if I remove subject S5 from the dataframe, I still get
the same error message:
Call:
  Model: fCR ~ SSasymp(Tr, Asym, R0, lrc) | subj
   Data: GCg

Coefficients:
        Asym        R0       lrc
S1 0.9430772 0.7075430 -4.617628
S2 0.9810034 0.0604899 -3.356152
S3 0.9851586 0.5392042 -3.030196
S4 1.6158708 0.8594590 -7.742318
S6 0.8411017 0.9881358 -3.726827

Degrees of freedom: 122 total; 107 residual
Residual standard error: 0.09946001
Error in nlmeCall[[i]] <- NULL : subscript out of bounds

And again it hangs there forever when I run the following
I'm not attaching the dataframe because of its moderate size, but I
can send it next time if needed.

Thanks for any suggestions,
Gang