[R-sig-ME] Simulating Data from a Generalized Linear Mixed Model

Chuck Cleland ccleland at optonline.net
Fri Aug 24 14:42:24 CEST 2007


Hello:
  Does anyone have suggestions for how one can simulate data for a
generalized linear mixed model?  For example, below are summaries of two
models fit by lmer() for which I would like to simulate new data.  If
the summaries do not provide sufficient information to generate new
observations, what other information is needed?

thanks for any help,

Chuck

> summary(fm1)
Linear mixed-effects model fit by REML
Formula: Y ~ V7 * TIME + (TIME | id)
   Data: df.uni
  AIC  BIC logLik MLdeviance REMLdeviance
 8795 8836  -4390       8763         8781
Random effects:
 Groups   Name Variance Std.Dev. Corr
 id            0.23671  0.48653
               0.52332  0.72341  -0.079
 Residual      0.51130  0.71506
number of obs: 2611, groups: id, 480

Fixed effects:
            Estimate Std. Error t value
(Intercept)  0.02499    0.04311   0.580
V7          -0.08775    0.06027  -1.456
TIME         0.15238    0.04826   3.158
V7:TIME      0.29308    0.06717   4.364

Correlation of Fixed Effects:
        (Intr) V7     TIME
V7      -0.715
TIME    -0.106  0.076
V7:TIME  0.076 -0.107 -0.718

> summary(fm2)
Generalized linear mixed model fit using Laplace
Formula: Y ~ V7 * TIME + (TIME | id)
   Data: df.uni
 Family: binomial(logit link)
  AIC  BIC logLik deviance
 2278 2319  -1132     2264
Random effects:
 Groups Name Variance Std.Dev. Corr
 id          0.63468  0.79667
             2.96036  1.72057  0.125
number of obs: 2601, groups: id, 480

Estimated scale (compare to  1 )  0.6274443

Fixed effects:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  0.29549    0.12484   2.367   0.0179 *
V7           0.08769    0.17198   0.510   0.6101
TIME        -0.67834    0.14820  -4.577 4.71e-06 ***
V7:TIME      0.45752    0.20165   2.269   0.0233 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
        (Intr) V7     TIME
V7      -0.726
TIME    -0.260  0.189
V7:TIME  0.191 -0.253 -0.735

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894




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