Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Root mean square error in R - mixed effect model

Tags:

r

Could you please tell me how to get/compute the value RMSE (root mean square error) in R when you perform a mixed effect model

Data: na.omit(binh) 
       AIC      BIC    logLik
  888.6144 915.1201 -436.3072

Random effects:
 Formula: ~1 | Study
        (Intercept) Residual
StdDev:    3.304345 1.361858

Fixed effects: Eeff ~ ADF + CP + DE + ADF2 + DE2 
                Value Std.Error  DF   t-value p-value
(Intercept)  -0.66390 18.870908 158 -0.035181  0.9720
ADF           1.16693  0.424561 158  2.748556  0.0067
CP            0.25723  0.097524 158  2.637575  0.0092
DE          -36.09593 12.031791 158 -3.000046  0.0031
ADF2         -0.03708  0.011014 158 -3.366625  0.0010
DE2           4.77918  1.932924 158  2.472513  0.0145
 Correlation: 
     (Intr) ADF    CP     DE     ADF2  
ADF  -0.107                            
CP   -0.032  0.070                     
DE    0.978 -0.291 -0.043              
ADF2  0.058 -0.982 -0.045  0.250       
DE2  -0.978  0.308  0.039 -0.997 -0.265

Standardized Within-Group Residuals:
        Min          Q1         Med          Q3         Max 
-2.28168116 -0.45260885  0.06528363  0.57071734  2.54144168 

Number of Observations: 209
Number of Groups: 46 
like image 247
hn.phuong Avatar asked Nov 30 '12 13:11

hn.phuong


1 Answers

The same result can be obtained from:

library(nlme)
library(sjstats)

fit <- lmer(Yield  ~ Species + (1|Population/variety), data = df1,REML=T)
rmse(fit)
like image 86
Reah Gonzales Avatar answered Oct 18 '22 17:10

Reah Gonzales