# [R] Interaction term in lmer

From: emine özgür Bayman <eozgur10_at_hotmail.com>
Date: Fri, 01 Jun 2007 18:01:02 +0000

Model 1: center effect (random) only
Model 2: trt (fixed) + center (random) + trt*center interaction.

Then, I want to compare these 2 models with Likelihood Ratio Test. Here are my lmer codes that I don't feel comfortable about their correctness.

Thanks a lot for your help...

Emine

model1 <- try(lmer(cbind( yvect, nvect-yvect) ~ 1 + (1 | center),   family = binomial, niter = 25, method = "Laplace", control = list(usePQL = FALSE) ))
>summary(model1)

Generalized linear mixed model fit using Laplace Formula: cbind(yvect, nvect - yvect) ~ 1 + (1 | center) Family: binomial(logit link)

AIC BIC logLik deviance
236.817 238.0951 -116.4085 232.817
Random effects:
Groups Name Variance Std.Dev.
center (Intercept) 0.088127 0.29686
number of obs: 14, groups: center, 7

Estimated scale (compare to 1) 0.2672612

Fixed effects:

Estimate Std. Error z value Pr(>|z|) (Intercept) -0.32084 0.14709 -2.1812 0.02917 *

```---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##################
model2 <- try(lmer(cbind( yvect, nvect-yvect) ~ trt*center  + ( 1 | center)
,
family = binomial, niter = 25, method = "Laplace", control = list(usePQL =
FALSE) ))

>summary(model2)
Generalized linear mixed model fit using Laplace
Formula: cbind(yvect, nvect - yvect) ~ trt * center + (1 | center)
AIC      BIC        logLik     deviance
30 39.58586 -1.547024e-07 3.094048e-07
Random effects:
Groups Name        Variance Std.Dev.
center (Intercept) 5e-10    2.2361e-05
number of obs: 14, groups: center, 7

Estimated scale (compare to 1)  0.2672612

Fixed effects:
Estimate Std. Error  z value Pr(>|z|)
(Intercept)  -1.060869   0.065372 -16.2282  < 2e-16 ***
trt2          1.118029   0.086842  12.8743  < 2e-16 ***
center2      -0.325428   0.504256  -0.6454  0.51869
center3      -0.325440   0.504258  -0.6454  0.51868
center4       0.655407   0.413449   1.5852  0.11292
center5      -0.325433   0.504256  -0.6454  0.51869
center6      -0.325421   0.504255  -0.6454  0.51870
center7       0.655422   0.413448   1.5853  0.11291
trt2:center2  0.673737   0.651313   1.0344  0.30094
trt2:center3 -0.137183   0.651314  -0.2106  0.83318
trt2:center4 -0.307083   0.583845  -0.5260  0.59891
trt2:center5 -0.137203   0.651314  -0.2107  0.83316
trt2:center6  1.654555   0.712419   2.3224  0.02021 *
trt2:center7  0.673705   0.651311   1.0344  0.30096
---

_________________________________________________________________

Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help