[R-sig-ME] Varying intercepts vs. varying slopes in MCMCglmm ordinal models
Jarrod Hadfield
j.hadfield at ed.ac.uk
Sat Feb 23 17:25:31 CET 2013
Hi,
Quoting Jonathan Salerno <jdsalerno at ucdavis.edu> on Fri, 22 Feb 2013
13:05:51 -0800:
> These are very simple questions which I think will be most easily answered
> conceptually and without any data.
>
> First, does MCMCglmm allow for specification of varying slopes vs. varying
> intercepts? In the call's most basic form,
>
> m<-MCMCglmm(outcome~fixed_effect, random=~cluster, family="ordinal",
> data=data, prior=prior),
>
>
> is the outcome 'intercept' or the slope of 'fixed_effect' varying by
> 'cluster'?
The intercept is varying by cluster.
random=~us(1+fixed_effect):cluster gives a random intercept/slope
model with estimated covariance, and
random=~idh(1+fixed_effect):cluster is the same but with the
covariance set to 0.
>
> Second, as I understand it the model cannot be fit with a nested data
> structure (ie, varying at multiple levels e.g. modeling child test scores
> within schools within districts). However, can effects vary across two
> clustering levels if they are not nested (e.g., modeling tests within
> schools and by religion)? If so, how is the model specified?
MCMCglmm does not require effects to be nested:
random=~school+religion fits two (cross-classified) sets of random
effects.
Jarrod
>
> Thanks very much in advance.
>
> [[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