Skip to content
Prev 5956 / 20628 Next

Fitting known var-cov matrix in logistic regression model

Dear David

Thanks for your response.

I tried geeglm and glmPQL and MCMCglmm.  I still can't work out how to fit the fixed var-cov structure. Here is what I did for MCMCglmm (my preferred option):

 gpdata<-data.frame(pos=as.integer(freq*n*2),neg=as.integer(n*2-freq*n*2),pop=c(1:15),env)
prior<-list(R=list(V=diag(1),nu=0.002),G=list(G1=list(V=10,nu=0.002)))
out<-MCMCglmm(cbind(pos,neg)~1+env,random=~pop,data=gpdata,family="multinomial2",prior=prior,burnin=3000,nitt=20000)
summary(out$VCV)
plot(out$VCV)
plot(out$Sol)
summary(out$Sol)

This gives sensible answers for the random effect (pop) variance and the fixed effects (intercept + env), i.e. those given by lmer and glm.  However I can't understand the manual on how to fit a predfined value of the var-cov matrix that describes the different variances for each pop and the covariances between them.  Is it in rcov, or in the priors (R or G?) with the fix option on.

I also could not get the family="zibinomial" to work because it needs idh or us variance functions which I don't know how to set up for this particular problem.  

I would really appreciate some help on this.

Margaret
On Thu, 21 Apr 2011, Margaret Mackinnon wrote:

            
The easiest way might be to use the SNP principal component scores for the
populations as covariates in an ordinary logistic regression. Otherwise
a GEE with your specified matrix, glmmPQL with a corSymm as per your model,
MCMCglmm.