Dear R-Users,
I am comparing the nlme package in S-Plus (v. 7.0) and R (v. 2.2.1, nlme
package version 3.1-68.1; the lattice, Matrix, and lme4 have also just
been updated today, Jan. 23, 2006) on a PC (2.40 GHz Pentium 4 processor
and 1 GHz RAM) operating on Windows XP. I am using a real data set with
1,191 units with at most 4 repeated measures per unit (data are
incomplete, unbalanced). I use the same code with the same starting
values for both programs and obtain slightly different results. I am
aware that at this stage my model is far from being well specified for
the given data. Nevertheless, I wonder whether one program is more
suited than the other to pursue my modeling.
Below I included the input + output code, first for S-Plus, than for R.
Many thanks and best regards,
Paolo Ghisletta
############
#S-Plus
#min=4, max=41
> logistic4.a <- nlme(jugs ~ 4 + 41 / (1 + xmid*exp( -scal*I(occ-1) +
u)), fixed=scal+xmid~1, random= u~1 |id, start=c(scal=.2, xmid=155),
data=jug, na.action=na.exclude, method="ML")
> summary(logistic4.a)
Nonlinear mixed-effects model fit by maximum likelihood
Model: jugs ~ 4 + 41/(1 + xmid * exp( - scal * I(occ - 1) + u))
Data: jug
AIC BIC logLik
29595.62 29621.3 -14793.81
Random effects:
Formula: u ~ 1 | id
u Residual
StdDev: 5.162391 3.718887
Fixed effects: scal + xmid ~ 1
Value Std.Error DF t-value p-value
scal 4.9697 0.0823 3339 60.39508 <.0001
xmid 683.5634 125.8509 3339 5.43153 <.0001
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-10.66576 -0.5039498 0.0002772166 0.1226745 5.453209
Number of Observations: 4531
Number of Groups: 1191
############
# R
> #min=4, max=41
> logistic4.a <- nlme(jugs ~ 4 + 41 / (1 + xmid*exp( -scal*I(occ-1)+
u)), data=jug, fixed=scal+xmid~1, random= u~1 |id, start=c(scal=.2,
xmid=155), method="ML", na.action=na.exclude)
> summary(logistic4.a)
Nonlinear mixed-effects model fit by maximum likelihood
Model: jugs ~ 4 + 41/(1 + xmid * exp(-scal * I(occ - 1) + u))
Data: jug
AIC BIC logLik
29678.11 29703.78 -14835.05
Random effects:
Formula: u ~ 1 | id
u Residual
StdDev: 5.116542 3.767097
Fixed effects: scal + xmid ~ 1
Value Std.Error DF t-value p-value
scal 4.9244 0.08121 3339 60.63763 0
xmid 633.6956 115.37512 3339 5.49248 0
Erreur dans dim(x) : aucun slot de nom "Dim" pour cet objet de la classe
"correlation"
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html