[R-sig-ME] simulate.lme (nlme)

Andrzej Galecki agalecki at umich.edu
Wed Sep 26 21:36:16 CEST 2007


Dear All,

simulate.lme generates an object (list) containing the MLs (and REMLs) 
for null and alternative models,  fitted to simulated data. Since models 
are nested and are fitted to the same data we anticipate that elements 
of the vector difx containing ML differences , i.e. object$alt$ML - 
objectnull$ML, are positive.

In the example below this difference is calculated for  30 simulations.
I am wondering why some of the elements in difx vector are less than zero.

Thank you

Andrzej Galecki
University of Michigan

PS. Thank you Professor Bates for your response to my previous question.




 > require(lme)
 > sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  
"methods"   "base"    

other attached packages:
 lattice     nlme
"0.15-4" "3.1-80"

 > orthSim <-simulate.lme(list(fixed = distance ~ age, data = Orthodont,
+ random = ~ 1 | Subject), nsim=30, seed=12345, m2 = list(random = ~ age 
| Subject))
 > difx <- orthSim$alt$ML - orthSim$null$ML
 > range(difx)
[1] -0.006097405  5.222863611




More information about the R-sig-mixed-models mailing list