[R] nlme function in S+ and R

From: <d.lee_at_stat.ubc.ca>
Date: Thu, 15 May 2008 12:19:12 -0700


Greetings and Salutations,

I was curious if anyone out there has had much experience with the nlme function in both S+ and R. Right now I am working on an HIV dataset and trying to fit a NLME model to the data, and the coefficients I get in S+ differ slightly from the coefficients in R:

R model : 12.44 0.84 39.07 10.70 4.48 7.48 0.60 1.85 0.18 S model : 12.45 0.59 36.65 1.07 5.46 7.59 0.35 1.92 0.20

Since there is a random component, I expect there to be some deviations from one another, but as you can see the coefficients for the 4th variable are just too different from one another and hence my concern. The S+ code I am using is:

fit4 <- try(nlme(lgcopy ~ logexp2(p1,b1,p2,b2,day),

                 fixed = list(p1 ~tnf, b1 ~tnf+cd4coun, p2~tnf,b2~basech50),
                 random = list(p1 ~ .,b1 ~.,p2~.,b2~.),
                 cluster = ~ patid,
                 data = completedata,
                 start = list(fixed=start0)

)
)

and, I believe, I made the appropriate adjustments for R:

fit4 <- try(nlme(lgcopy ~ logexp2(p1,b1,p2,b2,day),

                 fixed = list(p1 ~tnf, b1 ~tnf+cd4coun, p2~tnf,b2~basech50),
                 random = list(p1+b1+p2+b2~1),
                 groups = ~ patid,
                 data = completedata,
                 start = list(fixed=start0)

)
)

If anyone could lend some insight to this difference, it would be very much appreciated. Cheers.

Sincerely

 Derrick Lee, MSc Candidate
 Department of Statistics
 The University of British Columbia
 LSK-314A | 604 - 822 - 1299 x532
 d.lee at stat dot ubc dot ca | dgylee at mun dot ca  www.stat.ubc.ca/~d.lee/ | www.math.mun.ca/~derrick0/



R-help_at_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. Received on Fri 16 May 2008 - 15:02:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 16 May 2008 - 15:30:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive