s-news
[Top] [All Lists]

nlme() problem

To: s-news@wubios.wustl.edu
Subject: nlme() problem
From: "vito muggeo" <vitomuggeo@hotmail.com>
Date: Tue, 24 Jul 2001 20:36:23
Dear S+ users,
Do you know what is the minimum value of observations for each Subj to fit a logistic model with nlme()?
I've some problem in fitting the model:
For istance, my (grouped) dataframe is
test
Grouped Data: y ~ x | aa
 aa x   y
1  1 2 1.0
2  1 5 5.0
3  1 8 6.0
4  1 3 0.8
5  1 6 4.7
6  2 9 6.5
7  2 4 4.0
8  2 4 4.0
9  2 7 6.2
test.lis<-nlsList(y~SSlogis(x,Asym,xmid,scal),data=test)
Error: Too few distinct input values to fit a logistic
Dumped

Also, by using nlme directly, I have:
test.obj<-nlme(model=y~SSlogis(x,Asym,xmid,scal), data=test, fixed=list(Asym~1,xmid~1,scale~1), random=Asym+xmid+scale~1+x)
Error: Too few distinct input values to fit a logistic
Dumped
Error in grad[, nm]: Array subscript (4) out of bounds, should be at most 3
Dumped
Warning messages:
1: nlme.nlsList will redefine "fixed" "data", and "start" in: nlme.nlsList(mode
l = nlsLObj, fixed = list(Asym ~ 1, xmid ~ 1, scale ~ 1),   ...
2: Fewer observations than random effects in all level 1 groups in: nlme.formul
a(model = structure(.Data = y ~ SSlogis(x, Asym, xmid, scal), class  ...
3: Replacement length not a multiple of number of elements to replace in: pars[
, nm] <- pars[, nm] + b[[i]][rmapRel[[i]][[nm]], groups[[i]]]

So the problem should be the low number of observations. But I've 5 and 4 observations respectively for subj #1 and #2. Are they really too few?

Furthermore I fitted the Michaelis-Menten function (two parameters)
test.obj<-nlme(model=y~SSmicmen(x,A,B), data=test, fixed=list(A~1,B~1), random=A+B~1)

but the output was
Error in nls(y ~ x/(K + x), data = xy, start = li..: step factor reduced below
minimum
Dumped
Error in .C("matrixLog_pd",: subroutine matrixLog_pd: 3 missing value(s) in arg
ument 3
Dumped
Warning messages:
1: nlme.nlsList will redefine "fixed" "data", and "start" in: nlme.nlsList(mode
l = nlsLObj, fixed = list(A ~ 1, B ~ 1), random = A + B ~ 1)
2: Choleski decomposition not of full rank in: chol((value + t(value))/2)

Really, does my problem depend on the number of observations?
thank you very much for your help!
regards,
vito.

I'm running S+ 4.5 with nlme v 3.3 loaded by "library(nlme, first=T)"








_________________________________________________________________
Scarica GRATUITAMENTE MSN Explorer all'indirizzo http://explorer.msn.it/intl.asp


<Prev in Thread] Current Thread [Next in Thread>
  • nlme() problem, vito muggeo <=