# Model Every Group

We could also run a regression for every group. This is problematic since we would typically have so little data per group, and too many groups to make sense of. We’ll go ahead and do it anyway. What if we take the average of all the estimates?

library(nlme)
lottalm = lmList(y ~ time | id, d)
colMeans(coef(lottalm))
(Intercept)        time
-0.07981721  0.50855877 
coef(lm(y ~ time, data=d, x=T))
(Intercept)        time
-0.07981721  0.50855877 

Surprise! We get the same result as if we had simply run the standard linear model (I abbreviate this as SLiM sometimes). However, we would not get identical coefficients if the data are unbalanced, where individuals may have a different numbers of observations.

In general, this is not the way we want to do things, and one of the biggest drawbacks is that we can never examine cluster level covariates, which may be of key interest, nor is there a straightforward way to do inference for this scenario. As we will see later, techniques are available that serve as a compromise between these first two alternatives of ignoring the clustering and overfitting to each cluster.

• None really.

## Cons

• Inefficient
• Overly complex
• Overfit at each cluster
• High variance in estimates at each cluster
• Ignores cluster level effects

Gist: While it might be a fun exercise, there is little to be gained by this approach.