[R-sig-ME] Prior on G-structure and model formulation for ZIP model in MCMCglmm
Jarrod Hadfield
j.hadfield at ed.ac.uk
Tue Jan 12 19:41:21 CET 2010
----- Forwarded message from j.hadfield at ed.ac.uk -----
Date: Tue, 12 Jan 2010 18:12:21 +0000
From: Jarrod Hadfield <j.hadfield at ed.ac.uk>
Reply-To: Jarrod Hadfield <j.hadfield at ed.ac.uk>
Subject: Re: [R-sig-ME] Prior on G-structure and model formulation
for ZIP model in MCMCglmm
To: Christopher David Desjardins <desja004 at umn.edu>
Hi Chris,
You can drop the third (or first term) random term from your model
because they are identical, which leaves you with the three 1X1
covariance matrices to estimate (or if you like, 3 variances!).
Using the same prior that you used in the simpler model for all three
variances, the prior for G would look like
G=list(G1=list(V=1, nu=1, alpha.mu=0, alpha.V=25^2),
G2=list(V=1, nu=1, alpha.mu=0, alpha.V=25^2),
G3=list(V=1, nu=1, alpha.mu=0, alpha.V=25^2))
Whether this is an appropriate prior, is your responsibility.
Cheers,
Jarrod
Quoting Christopher David Desjardins <desja004 at umn.edu>:
> Hi,
> I am trying to estimate a model in MCMCglmm where my outcome variable is
> number of suspensions, a count variable. Presently, I am trying to
> predict the number of suspensions with the following MCMCglmm ZIP model
> (lots of students have no suspension).
>
> m0 <-MCMCglmm(sus~trait-1 + at.level(trait,1):grade +
> at.level(trait,1):I(grade^2), random=~us(at.level(trait,1)):id.f,
> data=suslm, rcov=~idh(trait):units, family="zipoisson", prior=prior,
> nitt=60000, thin=50, burnin=10000)
>
> Which has allowed me to answer the first part of my analysis. However,
> I'd like to account for correlations between students within a school as
> well as throwing in some covariates and am curious if the following
> model would be correct:
>
> m1 <- MCMCglmm(sus~trait-1 + at.level(trait,1):grade +
> at.level(trait,1):I(grade^2) + at.level(trait,1):gender +
> at.level(trait,1):ethnicity + at.level(trait,1):specialeducation +
> at.level(trait,1):ethnicity*grade +
> at.level(trait,1):ethnicity*I(grade^2),
> random=~us(at.level(trait,1)):id.f + us(at.level(trait,1)):schn.f +
> us(at.level(trait,1)):id.f + us(at.level(trait,1)):schn.f:id.f,
> data=suslm, rcov=~idh(trait):units, family="zipoisson", prior=prior,
> nitt=60000, thin=50, burnin=10000)
>
> Gender is a dummy variable: 0 - Female; 1 - Male
>
> Ethnicity is a dummy variable: 0 - non-Hispanic White, 1 - African
> American, 2 - Asian American, 3 - Hispanic, 4 - American Indian
>
> specialeducation is a dummy variable: 0 - Not in special ed, 1 - in
> special ed.
>
> id.f is the student's id
>
> schn.f is the school variable as a factor
>
> Students are able to, and often do, move between schools.
>
> My second question is what would the G-structure for this look like and
> what form might a prior take?
>
> For model m0, I have been specifying the following prior:
>
> G=list(G1=list(V=1, nu=1, alpha.mu=0, alpha.V=25^2))
>
> But now my G matrix is obviously more than 1 element. I believe it
> becomes a 4 x 4 matrix but I'm not even sure about that.
>
> Thanks for your patience with my questions. I've been working through
> Diggle et al. 2002 to try and get a better feel of these models.
>
> Chris
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
----- End forwarded message -----
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list