[R-sig-ME] MCMCglmm & multilevel multivariate models

Jarrod Hadfield j.hadfield at ed.ac.uk
Fri Apr 20 18:42:02 CEST 2012


Hi,

If your data are laid out like:

y1 y2 id time  x1  z1

0  0  a   1    1   0
0  1  a   2    1   0
1  1  a   3    1   1
3  2  b   1    2   1
0  3  b   2    2   1
1  0  b   3    2   0

for example then:

m1<-MCMCglmm(cbind(y1,y2)~trait-1+trait:x1+trait:z1,  
random=~us(trait):id, rcov=~cor(trait):units)

is probably the most complete ordinal model, with separate regressions  
of x1 and z1 on each response, correlated subject effects and  
correlated observation effects.

Regarding Shige's earlier comment I would be very very careful about  
fitting fully parameterised high dimensional models, and would try and  
simplify somehow.

Cheers,

Jarrod



Quoting Eiko Fried <torvon at gmail.com> on Fri, 20 Apr 2012 16:42:29 +0200:

> Stuart kindly hinted at MCMCglmm as a possible solution for the model I
> would like to calculate.
>
> I studied the MCMCglmm package and wonderfully detailed documentation in
> the last days, but was not able to answer a couple of questions, the two
> most important ones being:
>
> (1) How would a sample syntax look like for both a (a) multivariate model
> which is (b) at the same time repeated measure, including subjects as
> random effect also?
>
> (2) How does one differentiate between time-varying and time-invariant
> covariates in MCMCglmm?
>
> My goal is to calculate something like this:
> * y1 - y9; they are intercorrelated ordinal (0,1,2,3) items from a
> psychological screening instrument, left-skewed (plenty of 0s, few 3s)
> * x1 - x5: baseline covariates (ordered and continuous)
> * z1 - z10: time-varying dichotomous covariates (life events, assessed at
> every measurement point for the time between this and the last measurement
> point)
> * 5 measurement points
> * heterogeneity in intercepts and slopes between subjects, so this should
> also go in as random effect.
>
> The current hypothesis in the literature is that the predictors affect the
> outcome variables in a similar fashion (because the outcome variables load
> onto the same factor), my main goal is in showing that this is not the
> case, and that there are differential effects of the predictors on the
> response variables.
>
> Any advice as to how to do this in MCMCglmm would be highly appreciated.
>
> Thank you
> Eiko
>
> 	[[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