Skip to content
Back to formatted view

Raw Message

Message-ID: <20130223162531.17536f7w2mv0tlc8@www.staffmail.ed.ac.uk>
Date: 2013-02-23T16:25:31Z
From: Jarrod Hadfield
Subject: Varying intercepts vs. varying slopes in MCMCglmm ordinal models
In-Reply-To: <CAAVN0J_mHrFH3CZo4JYAJxx0d2=j5TsXbn6EW9CU5HcsvPMt1A@mail.gmail.com>

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.