[R-sig-ME] Bivariate MCMCglmm with repeated measures

Jarrod Hadfield j.hadfield at ed.ac.uk
Mon Aug 11 20:47:00 CEST 2014


Hi Sam,

One option would be

random = ~us(stage):Individual, rcov=~units

where the random term is a 2x2 covariance matrix (between individual  
variances for each stage and the covariance between them). There is  
only a single residual variance in my model - but this is OK, with  
binary data it can't be estimated so there is no point trying to  
estimates separate residual variances for each stage. You will need to  
fix the residual variance at something though (I use 1).

If you only have Individual level covariates (i.e. no  
observation-level covariates) then you could group your binary  
responses into a binomial response and fit the model

random=NULL, rcov = ~us(stage):units

This will give (nearly) the same answers as the first model if you  
rescale the (co)variances as described in the CourseNotes.  It will be  
much faster too.

You might also want to consider models that deal with temporal  
autocorrelation, but these are not implemented in MCMCglmm.

Cheers,

Jarrod
Quoting "PATRICK, Samantha" <spatrick at glos.ac.uk> on Mon, 11 Aug 2014  
17:34:05 +0000:

> Hi
>
> I running a bivariate GLMM, where both of my response variables have  
> repeated measures.  A dummy data set would look like this:
>
> Individual     Presence    Stage
> 1                      0                       1
> 1                      1                        1
> 1                      1                        2
> 1                      1                        2
> 2                     1                         1
> 2                     0                        1
> 2                     0                        1
> 2                     1                         2
> 2                     0                        2
>
> There are a series of individuals.  For each individual we have  
> measures presence/absence repeatedly during life stage 1 and then  
> again repeatedly during life stage 2.
>
> For a straight forward bivariate model, with a single measure per   
> individual (or repeated measures during only one life stage), the  
> data could be set up like this:
>
> Individual      Presence stage 1          Presence stage 2
>
> However because I have repeated measures for both stages I am  
> struggling to find out how to code the data so MCMCglmm can run.
>
> Does anyone have any experience with this kind of data structure?  I  
> can’t find anything on the R list.
>
> Many Thanks
>
> Sam
>
> Dr Samantha Patrick
> Research Fellow
> Biosciences QU116
> Francis Close Hall Campus
> University of Gloucestershire
> Cheltenham, GL50 4AZ, UK
>
> Research Associate: OxNav, University of Oxford
>
> ******From 1st August - 14th November 2014 I will be
> based in Montréal, which is 5 hours behind GMT  ******
>
> Tel: 07740 472 719
> Skype: sammy_patrick
> https://sites.google.com/site/samanthacpatrick/
>
> -
> ‘In the top 5 in the Green League Table; committed to sustainability’
> This email is confidential to the intended recipient. If you have  
> received it in error please notify the sender and delete it from  
> your computer.
> The University of Gloucestershire is a company limited by guarantee  
> registered in England and Wales.  Registered number: 06023243.   
> Registered office: The Park, Cheltenham, GL50 2RH
> Please consider the environment before printing this email.
> -
> _______________________________________________
> 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