[R-sig-ME] priors for a multi-response model (MCMCglmm)
Ned Dochtermann
ned.dochtermann at gmail.com
Mon Oct 11 22:06:25 CEST 2010
Hi all,
While I'm still struggling with properly specifying priors in general, I've
run into a specific problem I can't quite muddle through. I'm trying to
estimate the covariances among several behaviors with repeated measures per
individual. I initially did so using the following structure:
multi.prior<-list(G=list(G1=(list(V=diag(3),nu=3))),R=list(V=diag(3),nu=3))
#I know this assumes unit variance
multi.trait.p1<-MCMCglmm(cbind(trait1,trait2,trait3)~trait,
random=~us(trait):units, rcov=~us(trait):units,
family=c("poisson","poisson","poisson), data=Compiled, prior=multi.prior,
verbose=FALSE)
or if including fixed factors:
multi.trait.p2<-MCMCglmm(cbind(trait1,trait2,trait3)~trait+period+day,
random=~us(trait):units, rcov=~us(trait):units,
family=c("poisson","poisson","poisson), data=Compiled, prior=multi.prior,
verbose=FALSE)
(I actually run both a lot longer than the defaults but I've left that out
here as it isn't relevant)
Both of these models seem to work well, they give reasonable answers and
satisfy a variety of diagnostics.
However, in looking back over the data I realized the data had pretty severe
zero-inflation. Thus, I've tried to rerun the analyses using zero-inflated
models. Based on the MCMCglmm course notes I thought that the first step for
the priors would be to expand both G and R to diag(4):
multi.prior.zip<-list(G=list(G1=(list(V=diag(4),nu=4))),R=list(V=diag(4),nu=
4)) #the last 'nu' is wrong based on how ZIP model priors are specified in
the course notes
multi.trait.zip<-MCMCglmm(cbind(trait1,trait2,trait3)~trait,
random=~us(trait):units, rcov=~us(trait):units,
family=c("zipoisson","zipoisson","zipoisson),
data=Compiled,prior=multi.prior.zip,verbose=FALSE)
This doesn't work as "V is the wrong dimension for some priorG/priorR
elements". I also suspect it is more generally wrong due to the random and
rcov statements and issues with estimating aspects of the zero-inflation and
poisson covariances; however I'm specifically interested in estimating the
covariance matrix so I don't want to use an idh specification here.
I'd like to get the covariance matrix from a ZIP model but I'm not sure what
all the errors in the above coding are nor the solutions. Basically I know
both the specification of the prior and the specification of the model are
wrong. Any help would be greatly appreciated.
Thanks,
Ned
--
Ned Dochtermann
Department of Biology
University of Nevada, Reno
ned.dochtermann at gmail.com
http://wolfweb.unr.edu/homepage/mpeacock/Dochter/
--
More information about the R-sig-mixed-models
mailing list