[R] distribution for random effects?
Ben Bolker
bolker at ufl.edu
Wed Mar 3 04:38:39 CET 2010
Maureen Ryan <meryan <at> ucdavis.edu> writes:
>
> Hi R users,
>
> I am using the following model to analyze data from a factorial experiment
> (randomized complete block design with no replication within blocks):
>
> model <- glm(survival ~ density * vegetation + (1|block), data=sal2005,
> family="binomial")
>
Do you mean glmer? I don't think this code will work with glm() ...
> Does R use a binomial distribution in this formulation to model random
> effects or a normal distribution (in which case the analysis is not binomial
> at the scale of the experiment)? If the latter, is there a way to specify
> the distribution for random effects?
The random effects are normal on the scale of the linear predictor
(i.e. on the logit scale for binomial data). With glmer, normally
distributed random effects [again, on the scale of the linear predictor]
are your only choice. WinBUGS, AD Model Builder, ... ?
Further questions on this topic should probably go to
r-sig-mixed-models at r-project.org ...
More information about the R-help
mailing list