[R] Rounding of lme coefficients: Mac vs Windows
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sun Oct 7 14:30:02 CEST 2007
David Afshartous wrote:
> All,
>
> I have an lme model estimated in R 2.5.1 on my Mac; when I estimate the same
> model on Windows, the parameter coefficients are rounded to integers.
You are using a different version of R where the printing routines
changed in the meantime. Just extract the values form the fitted model
objects and you will see that just the printed version is rounded, not
the original one R calculates with...
Uwe Ligges
> Below
> is a similar example for the Orthodont data. Is there some option I need to
> set in the Windows version to prevent rounding? Didn't see this in the
> archives.
>
> Thanks,
> David Afshartous
>
>
>> sessionInfo()
> R version 2.5.1 (2007-06-27)
> i386-apple-darwin8.9.1
>
> locale:
> en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
> "base"
>
> other attached packages:
> nlme
> "3.1-84"
>> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
>>
>> fm1
> Linear mixed-effects model fit by REML
> Data: Orthodont
> Log-restricted-likelihood: -221.3183
> Fixed: distance ~ age
> (Intercept) age
> 16.7611111 0.6601852
>
> Random effects:
> Formula: ~age | Subject
> Structure: General positive-definite
> StdDev Corr
> (Intercept) 2.3270338 (Intr)
> age 0.2264276 -0.609
> Residual 1.3100399
>
> Number of Observations: 108
> Number of Groups: 27
>
>
>> sessionInfo()
> R version 2.6.0 (2007-10-03)
> 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:
> [1] nlme_3.1-85 foreign_0.8-23 arm_1.0-33 R2WinBUGS_2.1-6
> [5] coda_0.12-1 lme4_0.99875-8 Matrix_0.999375-2 lattice_0.16-5
> [9] MASS_7.2-36
>
> loaded via a namespace (and not attached):
> [1] grid_2.6.0 tools_2.6.0
>> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
>> fm1
> Linear mixed-effects model fit by REML
> Data: Orthodont
> Log-restricted-likelihood: -221
> Fixed: distance ~ age
> (Intercept) age
> 16.76 0.66
>
> Random effects:
> Formula: ~age | Subject
> Structure: General positive-definite
> StdDev Corr
> (Intercept) 2.33 (Intr)
> age 0.23 -0.61
> Residual 1.31
>
> Number of Observations: 108
> Number of Groups: 27
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list