1
$\begingroup$

I fitted the following model in r using the lme4 function. The following output is obtained. Is it possible to obtain a graph showing the four different parallel lines? Also, what inferential statistics should I use?

summary(mixedmodel) Linear mixed model fit by REML ['lmerMod'] Formula: (FMI) ~ MVPAper + Age + (1 | Child_ID)

REML criterion at convergence: 34444.6

Scaled residuals: 
 Min     1Q Median     3Q    Max 
-1.216 -0.123 -0.093  0.061 51.872 

Random effects:
Groups   Name        Variance Std.Dev.
Child_ID (Intercept)   6.459   2.541  
 Residual             283.758  16.845  
Number of obs: 4048, groups:  Child_ID, 1023

 Fixed effects:
      Estimate Std. Error t value
(Intercept)  2.1850969  0.5697864   3.835
MVPAper      0.0028865  0.0007984   3.615
Age9         0.0908241  0.7482005   0.121
 Age12       -0.3519625  0.7478261  -0.471
 Age15       -0.4881878  0.7499429  -0.651

 Correlation of Fixed Effects:
(Intr) MVPApr Age9   Age12 
MVPAper -0.350                     
Age9    -0.639 -0.040              
Age12   -0.652 -0.004  0.498       
Age15   -0.671  0.056  0.494  0.496
$\endgroup$
  • $\begingroup$ Some very slight adjustment to the code in the linked answer would be needed if lme4 is used instead of nlme, but that isn't difficult. $\endgroup$ – Roland Jul 26 '18 at 12:45
  • $\begingroup$ Could you please assist? I think i nearly have it $\endgroup$ – Oliver Mitchell Jul 26 '18 at 12:46
  • $\begingroup$ Assist how? Note that coding questions should be asked at Stack Overflow (and include a reproducible example) $\endgroup$ – Roland Jul 26 '18 at 12:47
  • $\begingroup$ I've addressed visualizing also here: stats.stackexchange.com/questions/275103/…. You can also do significance tests by loading the lmerTest package before fitting the model, or comparing nested models using the anova() function, like here: stats.stackexchange.com/questions/282646/… $\endgroup$ – Mark White Jul 26 '18 at 14:02

Browse other questions tagged or ask your own question.