[R-sig-ME] Logistic Regression for Matched Case-Control Data

Ben Bolker bbolker at gmail.com
Tue Jun 18 16:48:38 CEST 2013


Viechtbauer Wolfgang (STAT <wolfgang.viechtbauer at ...> writes:

> 
> Dear All,
 
> I am trying to wrap my head around using logistic random-effects
> regression models for the analysis of matched data and the results I
> obtain with lmer() when using this approach. So, let's say we have
> dichotomous outcomes for matched subjects in 2 groups (could also be
> repeated measurements on a single subject -- the idea is the
> same). We can write the subject-specific model as:
 
> P(Y_ij = 1) = alpha_i + beta x_ij,
 
> where Y_ij is the observed outcome (either 1 or 0) for subject j
> (either 1 or 2) for pair i (j = 1, ..., n), x_ij=0 for group 1,
> x_ij=1 for group 2, alpha_i is the intercept for pair i, and beta is
> the log(OR). Estimating this model with fixed intercepts is
> problematic, so the usual approach is to use a conditional logistic
> model (conditioning on Y_i1 + Y_i2).

 [snip snip snip to make Gmane happy]

> library(lme4)
> lmer(event ~ group + (1 | id), family=binomial, nAGQ=21)

> According to Agresti (2002; see also Neuhaus et al., 1994), this
> should yield the same estimate of beta for matched pairs with a
> non-negative sample log odds ratio (as in this example). With the
> right number of quadrature points (e.g., nAGQ=21), this does indeed
> yield the same value. But this appears to depend highly on what
> value of nAGQ is chosen. Also, the SE is different. I tried fitting
> the same model in some other software to compare results. For
> example, in Stata using xtmelogit, I get results that match up
> completely with those from the other approaches, including the SE of
> hat(beta).
 
> So, I am wondering if the high dependence of lmer() on the number of
> quadrature points in this particular application is expected. And is
> there an explanation for why the SE of hat(beta) is different in
> lmer()? I realize that clusters of size 2 is probably not something
> that lmer() was meant for, but the theory apparently says that the
> results should match up, so I am wondering if there is an intuitive
> explanation for what is going on here.

  With the development version of lme4 (which might ?? be more stable
?) I get values of the fixed effect of 0.8109 (plus or minus about
3e-5) as long as nAGQ >= 9 ...  for lme4.0 (which should be equivalent
to the CRAN version) it seems to take _slightly_ higher nAGQ to get
precise answers, but it still doesn't seem that sensitive to me.
(Might vary across platforms?)  However, I can't speak to the standard
error of hat(beta) ...



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