[R-sig-ME] MCMCglmm - Random effect prior specification
Jarrod Hadfield
j.hadfield at ed.ac.uk
Sat Nov 16 09:08:48 CET 2013
Hi Tanya,
The warning is because MCMCglmm augments the data set with missing
data for missing combinations of rep/sex. This is just an algorithmic
trick to keep the effects balanced and therefore easier to Gibbs
sample. It is not an warning the user really has to worry about.
However, if the rep 1 in males and females have no connection, except
by name, do you really expect their to be a between-sex covariance in
their effects. If not, probably better to use idh(sex):rep.
However, with so few reps it will not be possible to get precise
estimates of the variance of their effects, and the posterior will be
sensitive to alternate prior specifications. That being said, if the
rep effects are not of immediate interest this might not impact on the
rest of the analysis. You could also fit them as fixed effects.
Autocorrelation is not an issue per se, it just means you have to
collect more samples to get the same reduction in Monte Carlo error.
You should focus on the effective sample size and aim to get something
in the region of 1-2 thousand effective samples.
Cheers,
Jarrod
Quoting Tanya Pennell <T.Pennell at sussex.ac.uk> on Fri, 15 Nov 2013
10:06:23 +0000:
> Hi,
>
> I'm currently running an MCMCglmm for a data set of male and female
> fitness within 100 genetic fly lines.
>
> For each line, I have 4 female data points and 6 male data points.
>
> Each data point represents the average fitness of that sex in each
> replicate (note that reps are labelled 1-4 for females and 1-6 for
> males, and each rep for the sexes was carried out at different times
> - i.e. rep 1 female was done at a different time to rep 1 male).
>
> For the model, I therefore need to incorporate replicate by sex as a
> random effect:
>
> prior.model.2<-list(R=list(V=matrix(c(400,0,0,600),2,2),
> nu=0.01),G=list (G1=list(V=matrix(c(400,0,0,600),2,2), nu=2,
> alpha.mu=c(0,0), alpha.V=matrix(c(400,0,0,600),2,2),
> G2=list(V=matrix(c(400,0,0,600),2,2), nu=2, alpha.mu=c(0,0),
> alpha.V=matrix(c(400,0,0,600),2,2))))
>
>
> model.2 <- MCMCglmm(S_relative_fec ~ sex-1, random=~us(sex):line +
> us(sex):rep,rcov=~idh(sex):units, family="gaussian", nitt = 100000,
> burnin = 30000, thin=30, data = h100newdata, prior = prior.model.2,
> verbose = FALSE)
>
>
> However, when I run this model I get the following warning message:
> 'some combinations in us(sex):rep do not exist and 2 missing records
> have been generated'
>
> The autocorrelation for female rep and units is also very high
>
> Does anyone know how I can correct the model or prior to change this?
>
> Many thanks,
> Tanya
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> 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.
More information about the R-sig-mixed-models
mailing list