[R] How to plot results from lme in presence of a significant interaction

angelo.arcadi at virgilio.it angelo.arcadi at virgilio.it
Sun Nov 22 23:44:26 CET 2015


Dear list members,
I wonder which is the best way to plot in r the 
results from the lme function, in presence of a significant interaction.
 My model has two interacting fixed effects and a random effect. The 
analysis is from an experiment where 19 participants had to adjust the 
Centroid parameter of some sounds stimuli, and I want to assess whether
 there is a relationship between their choices and their height and 
weight. There were 12 stimuli repeated twice for a total of 24 trials.
Here is the output of my analysis:

    > library(nlme)
    > lme_Centroid <- lme(Centroid ~ Weight*Height, data = scrd, random = ~1 | Subject)
    > 
    > summary(lme_Centroid)
    Linear mixed-effects model fit by REML
     Data: scrd 
           AIC      BIC    logLik
      25809.38 25840.69 -12898.69
    
    Random effects:
     Formula: ~1 | Subject
            (Intercept) Residual
    StdDev:    398.9658  3027.67
    
    Fixed effects: Centroid ~ Weight * Height 
                       Value Std.Error   DF   t-value p-value
    (Intercept)   -20232.203  9101.096 1349 -2.223051  0.0264
    Weight           478.854   152.184   15  3.146536  0.0067
    Height           140.440    52.194   15  2.690751  0.0168
    Weight:Height     -2.725     0.838   15 -3.253770  0.0053
     Correlation: 
                  (Intr) Weight Height
    Weight        -0.927              
    Height        -0.994  0.886       
    Weight:Height  0.951 -0.996 -0.919
    
    Standardized Within-Group Residuals:
           Min         Q1        Med         Q3        Max 
    -1.5059828 -0.8664208 -0.2111113  0.7098706  2.3620633 
    
    Number of Observations: 1368
    Number of Groups: 19 



I
 do not know how to represent in R these results. I tried 
xyplot(Centroid ~  Weight * Height, type = c("p","r"), data = scrd) but I
 guess it is wrong.

Thank you in advance

Best regards

Angelo
	[[alternative HTML version deleted]]



More information about the R-help mailing list