\begin{Schunk}
\begin{Sinput}
 library(lme4)
 ## set time to begin at 0 to match the Mplus calculations
 anxiety2$time <- anxiety2$time -1
 m1 <- lmer(anxiety ~ time + (time | id), data = anxiety2)
 summary(m1)
\end{Sinput}
\begin{Soutput}
Linear mixed model fit by REML ['lmerMod']
Formula: anxiety ~ time + (time | id)
   Data: anxiety2

REML criterion at convergence: 1161.2

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.0428 -0.5191 -0.0757  0.4761  3.2378 

Random effects:
 Groups   Name        Variance Std.Dev. Corr 
 id       (Intercept) 0.154950 0.39364       
          time        0.007544 0.08686  -0.39
 Residual             0.049801 0.22316       
Number of obs: 1940, groups:  id, 485

Fixed effects:
             Estimate Std. Error t value
(Intercept)  0.702800   0.019783   35.53
time        -0.065068   0.006008  -10.83

Correlation of Fixed Effects:
     (Intr)
time -0.489
\end{Soutput}
\end{Schunk}
