Thanks a lot!

How about this one?


 > (fm9 <- lmer(Reaction ~ 1 + Days + (1|Subject) + (1+Days|Subject),
+ sleepstudy, REML = 0))

On Wed, May 9, 2012 at 4:31 PM, Gang Chen <gangchen@mail.nih.gov> wrote:

> Here is my suggestion:
>
> > summary(fm9 <- lmer(Reaction ~ 1 + Days + (1|Subject) +
> (0+Days|Subject), sleepstudy, REML = 0))Linear mixed model fit by maximum
> likelihood
>
> Formula: Reaction ~ 1 + Days + (1 | Subject) + (0 + Days | Subject)
>   Data: sleepstudy
>  AIC  BIC logLik deviance REMLdev
>  1762 1778   -876     1752    1744
> Random effects:
>  Groups   Name        Variance Std.Dev.
>  Subject  (Intercept) 584.250  24.1713
>  Subject  Days         33.633 5.7994 <33.633%20%20%205.7994>
>  Residual             653.116  25.5561
> Number of obs: 180, groups: Subject, 18
>
> Fixed effects:
>            Estimate Std. Error t value
> (Intercept)  251.405      6.708   37.48
> Days          10.467      1.519    6.89
>
> Correlation of Fixed Effects:
>     (Intr)
> Days -0.194
>
> > summary(fm10 <- lme(Reaction ~ 1 + Days,
> random=list(Subject=pdBlocked(list(pdIdent(~1), pdSymm(~0+Days)))),
> sleepstudy, method='ML'))
>
> Linear mixed-effects model fit by maximum likelihood
>  Data: sleepstudy
>       AIC      BIC    logLik
>  1762.003 1777.968 -876.0016
>
> Random effects:
>  Composite Structure: Blocked
>
>  Block 1: (Intercept)
>  Formula: ~1 | Subject
>        (Intercept)
> StdDev:    24.17127
>
>  Block 2: Days
>  Formula: ~0 + Days | Subject
>            Days Residual
> StdDev: 5.799409 25.55613
>
> Fixed effects: Reaction ~ 1 + Days
>                Value Std.Error  DF  t-value p-value
> (Intercept) 251.40510  6.745252 161 37.27142       0
> Days         10.46729  1.527826 161  6.85110       0
>  Correlation:
>     (Intr)
> Days -0.194
>
> Standardized Within-Group Residuals:
>       Min         Q1        Med         Q3        Max
> -3.9535402 -0.4672676  0.0239343  0.4625157  5.1883448
>
> Number of Observations: 180
> Number of Groups: 18
>
>
> On Wed, May 9, 2012 at 5:01 PM, Michael <comtech.usa@gmail.com> wrote:
> > How to convert the formula from LME4 to NLME?
> >
> > Hi all,
> >
> > We have the following fomular in LME4:
> >
> >  > (fm9 <- lmer(Reaction ~ 1 + Days + (1|Subject) + (0+Days|Subject),
> > + sleepstudy, REML = 0))
> >
> > How to do the same in NLME?
> >
> > Thanks a lot!
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]

