3
$\begingroup$

I am new to R, and don't see these questions answered anywhere in documentation (though I could be wrong).

  1. I am using the following nomenclature to run my mixed-effects logistic regression, based on instructions from another site:

    output <- glmer(DV ~ IV1 + IV2 + (1 | RE), family = binomial, nAGQ = 10)
    RE is a factor with several levels.

    This works. But I'm wondering why it's necessary to use the (1 | RE) syntax instead of just DV~IV1+IV2 | RE.

  2. I am running two mixed effects logistic regressions. On one of them I can view the random effects intercepts using ranef(). But I get all 0s when I run ranef on the output of the other one. Both regressions/data are ostensibly the same. What do all 0s for the random effects intercepts mean?

$\endgroup$

1 Answer 1

2
$\begingroup$
  1. (1|RE) specifies that you want the intercept to vary randomly across levels of RE. You could also specify (1+IV1|RE) for example if you wanted the intercept and the slope for IV1 to vary randomly.

  2. Perhaps there is no considerable variation in the intercept across RE that can be picked up in the second data set. Does the basic fit output (summary(fitObject)) suggest no variation on that intercept in the second model?

That's about all that can be said without more information.

$\endgroup$
1
  • $\begingroup$ This was enormously helpful. In regards to question 2, I just looked at the summary() output for the model, and indeed the variance is 0 and SD 0 for the random effects variable. I'm surprised by this; I think I need to go back and make sure the data in my data matrix is lined up correctly. $\endgroup$ Commented Feb 27, 2014 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.