[R-sig-ME] Prior on G-structure and model formulation for ZIP model in MCMCglmm

Christopher David Desjardins desja004 at umn.edu
Tue Jan 12 17:43:27 CET 2010


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




More information about the R-sig-mixed-models mailing list