Luana Marotta
2011-Feb-01 16:51 UTC
[R] Lmer binomial distribution x HLM Bernoulli distribution
Dear R-users, I'm running a lmer model using the lme4 package. My dependent variable is dichotomous and I'm using the "binomial" family. The results are slightly different from the HLM results based on a Bernoulli distribution. I read that a Bernoulli distribution is an extension of a binomial distribution. Is that right? If so, how can I adapt my R model to a Bernoulli distribution so that my R results are the same as my HLM results? Thank you so much, Luana Marotta [[alternative HTML version deleted]]
Douglas Bates
2011-Feb-01 18:50 UTC
[R] Lmer binomial distribution x HLM Bernoulli distribution
On Tue, Feb 1, 2011 at 10:51 AM, Luana Marotta <lucsmarotta at gmail.com> wrote:> Dear R-users,> I'm running a lmer model using the lme4 package. My dependent variable is > dichotomous and I'm using the "binomial" family. The results > are slightly different from the HLM results based on a Bernoulli > distribution. I read that a Bernoulli distribution is an extension of a > binomial distribution. Is that right? If so, how can I adapt my R model to a > Bernoulli distribution so that my R results are the same as my HLM results?Actually it's the other way around. A binomial(n, p) random variable is the sum of n independent Bernoulli(p) random variables. Alternatively, you could describe the Bernoulli(p) distribution as a special case of the binomial, the binomial(1, p) distribution. It is generally more productive to ask questions regarding lme4 and lmer on the R-SIG-Mixed-Models at R-project.org mailing list. It would help if you could make the data and the output of your model fits available so we can check on different systems.
Maybe Matching Threads
- Sequence for repeated numbers
- Specify a minimum number of valid arguments for the mean function
- reliability of the level-1 random coefficients (lme4)
- Random Bernoulli sequences with given point-biserial correlation?
- generating correlated Bernoulli random variables