[R-sig-ME] Function sim() from the arm package

Murray Jorgensen maj at stats.waikato.ac.nz
Wed Jan 12 04:29:18 CET 2011


I am getting unexpected behaviour from the sim() function of the arm 
package for the book "Data Analysis Using Regression and 
Multilevel/Hierarchical Models" by Gelman & Hill:

Running the example all is fine until
 > # Example 2
 >  u.full <- u[group]
 >  E2 <- lmer (y ~ x + u.full + (1 | group))
 >  display(E2)
lmer(formula = y ~ x + u.full + (1 | group))
             coef.est coef.se
(Intercept)  0.73     0.16
x           -0.28     0.04
u.full       0.16     0.08

Error terms:
  Groups   Name        Std.Dev.
  group    (Intercept) 0.16
  Residual             0.37
---
number of obs: 120, groups: group, 15
AIC = 131.9, DIC = 98.3
deviance = 110.1
 >  E2.sim <- sim (E2)
Called from: getAugmentedDesignMatrix(model)
Browse[1]> 3+4
[1] 7
Browse[1]> #
Browse[1]>
 >

The output
Called from: getAugmentedDesignMatrix(model)
and the change of the prompt to
Browse[1]>
are unexpected and seem to interfere with the running of some scripts 
associated with the book, in particular those connected with the 
earnings versus height data set.

I am running R 2.11.1 on Windows XP but I think the packages are at 2.10.1.

Murray
-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    Home +64 7 825 0441   Mobile 021 0200 8350




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