Skip to content

MCMCglmm - ZIP model for mackerel egg data

2 messages · Gastauer, Sven, Jarrod Hadfield

1 day later
#
Hi Sven,

Quoting "Gastauer, Sven" <sven.gastauer at wur.nl> on Thu, 7 Feb 2013  
16:11:49 +0000:
You can fit an offset by fixing the regression coefficient at 1 in the  
prior. For example if the offset variable is associated with the 2nd  
fixed effect out of 3 then:

prior<-list(B=list(V=diag(3)*1e+8, mu=c(0,1,0)), ...)
prior$B$V[2,2]<-1e-8

or something similar, achieves this.
If you only want to fit random effects for the count process

random = ~idh(at.level(trait,1)):YEAR

is probably a better way of doing it. This just fits a single variance  
rather than a 2x2 covariance matrix.

Your prior degrees of freedom are large. With idh structures you have  
nu=2 on a single variance. I would use something smaller (e.g. 0.002)  
or preferably parameter expanded priors.
the predict method does not work with ZIP models yet, so you will have  
to do it by hand I'm afraid. The expected value is (1-pi)*lambda where  
pi is the probability of being zero from the zero-inflation part of  
the model, and lambda is the Poisson rate (in the CourseNotes  
notation: (1-plogis(l_2))*exp(l_2)).

I am not sure what the expectation would be after marginalising the  
random effects/overdispersion, particularly if the two processes are  
correlated (which they are not in your model).

Cheers,

Jarrod