[R] MCMCglmm heteroscedasticity dependent on predictor

Atle Torvik Kristiansen atletorvik at gmail.com
Thu Sep 15 12:59:01 CEST 2011


Hi,

I have a dataset where the residual variance decreases with on one of
the predictors (population size).

Currently, the full model looks like this:

prior<-list(R=list(V=1e-16, nu=-2),G1=list(V=diag(2), nu=2))

m<-MCMCglmm(response~poly(population size,2)*poly(other
predictor,2)+time, random=~us(1+time):population, data=data,
prior=prior)

Basically, it's a random regression with multiple populations measured
multiple times.

I have limited knowledge of MCMC, so:

1)  Does the specification of the prior seem sensible?

2) How do i specify rcov? Is e.g. rcov=~us(population size):units a
good approach?

3) If I would like to include the other predictor in the rcov
specification. Is this a good approach, rcov=~us(other
predictor:population size):units?

I know I could easily do this in nlme, but I'm hoping to avoid it. One
reason is that I understand MCMC methods make it straightforward to
assess the relative contribution of each predictor to the response.


Kind regards,

Atle Torvik Kristiansen



More information about the R-help mailing list