[R-sig-ME] MCMCglmm different random effects specifications

Jarrod Hadfield j.hadfield at ed.ac.uk
Mon Jun 3 17:54:05 CEST 2013


Hi Ian,

Your interpretation of the models makes sense. Note that mc1 is a  
special case of mc2 when all cells of the mc2 covariance matrix are  
identical (i.e. homogeneous variances and correlations of 1). In  
general I would fit mc3 rather than mc2 to be on the safe side:  
especially if different observers take measurements in different years  
(and vary in how good they are). The 2x2 covariance matrix of  
intercepts and slopes in mc2a can also be turned into a year by year  
covariance matrix as in mc2/mc3. Have Y as the year x year covariance  
matrix and V as the intercept/slope covariance matrix. Y[i,j] =  
V[1,1]+(year[i]+year[j])*V[1,2]+year[i]*year[j]*V[2,2]. As you point  
out mc4 would be pushing the data a little hard  - a double  
hierarchical model would probably be used in this instance where the  
individual-level variances are assumed to come from some distribution  
such as gamma or log-normal.

Cheers,

Jarrod




Quoting Ian Cleasby <i.r.cleasby at gmail.com> on Fri, 24 May 2013  
10:53:21 +0100:

> Hi,
>
> I was looking to ask a question about how one could specify and interpret
> models in MCMCglmm when looking at the between-group variability in a
> particular response variable which has been measured across different time
> periods.
>
> The examples I am working with at the moment come from studies in which we
> have repeated measures of individuals behaviour both within a year and
> across 3 years. One thing we were interested in was the consistency of the
> behavioural response both within and between years So imagine we have
> measured 10 individuals 10 different times across 3 years, giving us
> 10*10*3 = 300 total observations for a response variable y that is normally
> distributed.
>
> A relatively simple model might be:
>
>
> mc1 <-MCMCglmm(y ~ as.factor(Year), random =~ Individual, data= Data)
>
> however if I wanted to allow the between individual variance to vary by
> year I could go:
>
> mc2 <-MCMCglmm(y ~ as.factor(Year), random =~ us(as.factor(Year)):
> Individual, data= Data)
>
>
> Now, as I understand it the us structure allows me to estimate different
> between individual variances for each year but it also gives me some
> co-variances as well and it was these covariances that I wanted to be sure
> about. Following the example from the blue tits analysis in chapter 3 of
> the MCMCglmm course notes I thought that the covariances between different
> years would give an indication of whether measurements from the same
> individual but from different years were really independent. Could I then
> use this covariance between years convert it to a correlation in order to
> say whether individuals show a consistent response across years?
>
> Alternatively you could maybe year as numeric and have a continuous random
> slope approach and look at the correlation between intercept and slope?
>
>
> mc2a <-MCMCglmm(y ~ as.numeric(Year), random =~ us(1+as.numeric(Year)):
> Individual, data= Data)
>
> although I find interpretation of the correlation between slopes and
> intercepts tricky at times.
>
>
> Also, for further extensions it'd be relatively straightforward to allow
> the residual variance to differ across years as well
>
>
> mc3 <-MCMCglmm(y ~ as.factor(Year), random =~ us(as.factor(Year)):
> Individual, rcov=~idh(as.factor(Year)), data= Data)
>
> but I wasn't sure whether you'd be able to extend to further to different
> individuals
>
> e.g
>
> mc4 <-MCMCglmm(y ~ as.factor(Year), random =~ us(as.factor(Year)):
> Individual, rcov=~idh(Individual), data= Data)
>
> mainly due to a lack of samples per individual from which to estimate
> variance?
>
>
>
> Any help, advice or suggestions greatly appreciated.
>
> Thanks
>
> Ian
>
> 	[[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