[R-sig-ME] "Animal Model" plus logistic regression
Bertrand Servin
bertrand.servin at toulouse.inra.fr
Mon Jun 7 17:41:14 CEST 2010
Dear list,
I tried searching in the archive, but cannot seem to find a relevant
thread on my problem. I would like to fit a generalized linear
model (logit link) where the random effects are individuals and
I estimated (from genetic data) the expected correlation between
these random effects. This is sometimes called "Animal model" because
it is quite used in livestock genetics.
This could be a simple dataset:
library(lme4)
y=c(1,1,0,0)
ID=as.factor(1:4)
V=matrix(c(1,0.1,0.2,0.3,0.1,1,0,0,0.2,0,1,0,0.3,0,0,1),nrow=4,byrow=T)
The model is just logit(y) ~ mu + e
with Var(e)=V.sigma^2_a+I.sigma^2_e
So V is not to be estimated within the model fit, I just want to
get an estimate of sigma^2_a, and the model residuals.
I was thinking among these lines:
glmer(y~1|ID,family=binomial,doFit=FALSE)
and then modify something within this model.
Related question, how do I actually fit the model once
I made the modifications needed ?
Is this the right way to go ?
thanks for your help
--
Bertrand Servin
More information about the R-sig-mixed-models
mailing list