4
$\begingroup$

I have some data with individual level variables (like satisfaction) and these individuals are nested within buildings (there are 12 different buildings) and I have a continuous variable that is measured at the building level. I'm trying to use this to predict an outcome that is count data. Should I be running a sort of multilevel model here? If so, what could this model say about my data differently than if I just combined all these factors into a linear model?

$\endgroup$

1 Answer 1

2
$\begingroup$

If you simply fitted a linear regression model with your covariates, without taking account of clustering, you my obtain biased results. This is because your data are clustered within buildings. This leads to observations that are more similar to others in the same building than to those in other buildings. That is, there is intra-class correlation. Failure to adequately adjust for this can lead to biased fixed effects.

One popular and principled approach is to use a generalized linear mixed effects model, where you would specify random intercepts for buildings.

This would be a 2-level multilevel model with individuals are level 1 and buildings at level 2.

If you simply fitted a (generalized) linear model, the parameter estimates could be biased. Therefore you should definitely fit a model that adjusts for the clustering. Personally I would use a mixed effects model (also known as a mixed model and also known as multilevel model in this case), although there are alternatives, such as a linear model were the building ID is also fixed effect (no random effects) or generalized estimating equations.

One of the advantages of the mixed model framework is that you can easily incorporate random slopes for the fixed effects, if warranted.

$\endgroup$
4
  • $\begingroup$ Can the continuous variable that only applies to buildings (at level 2) be included in the model even though there are just 12 buildings? $\endgroup$
    – Jin
    Commented Feb 15, 2019 at 22:58
  • $\begingroup$ @762 Yes ! ! A mixed effects model will handle this automatically. If you use R then take a look at the lme4 package $\endgroup$ Commented Feb 15, 2019 at 23:00
  • $\begingroup$ Excellent! Can the lme4 package also handle discrete outcomes and predictors (like number of people in building) $\endgroup$
    – Jin
    Commented Feb 15, 2019 at 23:02
  • $\begingroup$ @762 Yes, for the dependent variable, depending on the numbers you may want to fit a Poisson model (which would be a GLMM), though if the numbers are large and well approximated by a normal distribution, a LMM may be adequate, If you refer to independent variables, they should be handled automatically. Take a look at the 2 references I gave to my answer here which are both by the authors of the lme4 package $\endgroup$ Commented Feb 15, 2019 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.