# Multilevels model versus Regression

#### JesperHP

##### TS Contributor
Assume I want to model data on dependent variable $$y_i$$ for $$N$$ observations belonging to $$J$$ groups. Assume we are looking at N students distributed on J classes.

Why should on use multilevel model:

$$y_{ij} = \beta_{0j} + \epsilon_{ij}$$
$$\beta_{0j} = \gamma_{00} + u_{0j}$$

where $$\gamma_{00}$$ is fixed whereas
$$\epsilon_{ij}$$ and $$u_{0j}$$ are random.

Rather than a standard regression with dummies:
$$y_{ij} = \delta_{0} + \delta_1 I_{i1} + ... + \delta_J I_{iJ} + v_i$$
where $$I_{ij}$$ is dummy for observation unit - student - i being in group j.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Do you mean multilevel regression vs. regression with a categorical variable containing the groups or vs. a single dummy variable for each group included in the model (which are probably comparable?)?

Either way, you are trying to account for the covariance structure (non-independence within the groups). It might help if you had an example of the type of groupings you have (e.g., classrooms, towns, or say repeated measures). In addition, multilevel modeling lets you define the covariance structure, this way you are accurately accounting for the lack of independence and variability structure, which if used when needed minimizes rejecting the null when it is true.

#### GretaGarbo

##### Human
Why use a multilevel/mixed model?

Because mean squared error will be on average lower if you shrink the estimates towards the overall mean. One motivation is the James & Stein estimator.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
JesperHP, I typical run an empty model first with no independent variables, though controlling for clusters. If controlling for clusters doesn't explain significance variability I use a fixed effects model with robust SE estimates. I have seen this approach mentioned, and if imagine it as an occam's razor approach.

I would be curious if anyone had concerns or comments on this practice? Or if they support it!

#### JesperHP

##### TS Contributor
With respect to the covariance structure:
There are the group means and some groups may have higher mean that other groups. What does the covariance structure add to this knowledge about the means?

Clearly the mixed/multilevel model allows for another error term structure $$v_i$$ for the regression - let us assume independence due to sampling right - versus $$\epsilon_{ij} + u_{j}$$ and of course SE of estimator for means will be different and hence wrong if the multilevel model is the true model while one assumes the regression model.

But I'm more interested in the ontological question, what is it that this extra randomness is used to model, and of course that is more easily answered if there is an example to support interpretation. Classes in a school is what I'm thing about and grades as dependent variable.

JesperHP, I typical run an empty model first with no independent variables, though controlling for clusters. If controlling for clusters doesn't explain significance variability I use a fixed effects model with robust SE estimates. I have seen this approach mentioned, and if imagine it as an occam's razor approach.

I would be curious if anyone had concerns or comments on this practice? Or if they support it!
To me this sounds perfectly reasonable.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
I am not a technical person, just applied, so I wont do justice to this. However, are you familiar with meta analyses. Well this is in the same general family. So in meta-analyses you want to group a bunch of studies together, but hey there is potential heterogeneity between them. One conducted in urban school, some rural, etc. Well it isn't appropriate to just create one big sample, since they have differences and students in the same school will perform similarly due to baseline covariates and implementation of intervention, etc.

So now you need to control for between student variance and between study variance. If you don't you risk bias. So in this example there isn't a dynamic type of covariance structure like in repeated measures (say autocorrelation), but there is definitely differences.

This may not have addressed your question but it helped me think about the topic.

#### rogojel

##### TS Contributor
hi,
I am a beginner in mixed modelling but what I understood is that you can get a general idea of the influence of the class IV without having to sacrifice as many degrees of freedom as would be needed in the regression case. Also, I would be more interested in the variance introduced by the different classes but typically not in the concrete effect of each class in particular - that level of detail would not be worth sacrificing degrees of freedom for. I found this book very interesting and useful:https://www.amazon.de/EFFECTS-EXTEN...s&ie=UTF8&qid=1470420559&sr=1-3&keywords=Zuur