[R] error in nlme

Setzer.Woodrow@epamail.epa.gov Setzer.Woodrow at epamail.epa.gov
Wed Sep 12 22:50:16 CEST 2001


I'm getting an error from nlme that has me stymied.  I have a data set
,'mydata', with variables: AChE, Dose, sex, set, and mrid; 'set' and 'mrid'
indicate two levels of nesting, with 'set' nested within 'mrid'.  I want to
fit the model:

mod <- nlme(AChE ~ Cexp(Dose, A, B, m), data=mydata,  fixed = A+B+M~sex,
random=A+B+m~sex | mrid/set, weights=varPower(fixed=1))

(mydata has over 1000 records, so I won't reproduce it here).

When I run this, I get the error:

Error: dim<- length of dims do not match the length of object

It turns out the error is being thrown by the statement:

dim(work$pdFactor) <- dim(pdMatrix(nlmeSt$reStruct[[1]]))

indeed:

Browse[1]> length(work$pdFactor)
[1] 72
Browse[1]> dim(pdMatrix(nlmeSt$reStruct[[1]]))
[1] 6 6

It looks like work$pdFactor contains information about both levels of
nesting, which is being ignored.

Does someone have an idea for a fix (or am I abusing nlme)?

I'm using :

> package.description("nlme")[1:3]
     Package      Version         Date
      "nlme"     "3.1-17" "2001/08/26"
         _
platform i386-pc-mingw32
arch     x86
os       Win32
system   x86, Win32
status
major    1
minor    3.1
year     2001
month    08
day      31
language R

R. Woodrow Setzer, Jr.                                            Phone:
(919) 541-0128
Experimental Toxicology Division                       Fax:  (919) 541-5394
Pharmacokinetics Branch
NHEERL MD-74; US EPA; RTP, NC 27711

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list