Page 1 of 1

Random effects for level 2 covariates

Posted: Wed May 28, 2014 11:10 am
by maelsu2012
Hi,
I have been reading through the online training course supplied with MLwiN and I was wondering if there was ever any reason to supply a level 2 covariate with level 1 random effects? For example if students were nested within a class would it be reasonable to allow random effects for a class level covariate if that covariate may have a differing effect within the class between students? Or would this be modelled using a level 2 covariate level 1 covariate interaction term? I couldn't see any examples of this in the course, and wasn't sure of the correct approach.
Many thanks

Re: Random effects for level 2 covariates

Posted: Tue Jun 03, 2014 8:54 am
by billb
Hi Maelsu2012,
If you allow a level 2 covariate to be random at level 1 you are essentially saying that the within level 2 variability is different for different values of the level 2 predictor. This is
perfectly acceptable and for example is a route for allowing a different level 1 variance for boys schools/girls schools/mixed schools in a 2 level educational setting of pupils within schools. Be
warned that in a scenario like this however with binary predictors you may need to set certain parameters to zero within the level 1 variance function as you want one parameter only for each
of the school types.
Hope this helps,
Bill.