PLM: Keep dummy variable in Fixed Effects / Random Effects analysis I have a short panel dataset that I want to analyze. It contains panel data of multiple individuals. Each individual is assigned to 1 of 4 treatment groups and I am interested in the effect of these treatments. Basically I want to run this regression:
Y = X + Z + Condition
(X, Z vary over time; Condition is a dummy variable and time-constant)
I can't use the fixed effects "within" model, because the variable I'm interested in will drop out - since it is time-invariant.


*

*reformulated: I think the proper way to analyze this dataset regarding my variable of interest (Condition) is random effects. 


However, I am not sure - is there a better way?
 A: You are correct. You can't use a fixed effects model to analyze the effect of a treatment that is assigned at the "group" level. In your case the "groups" are people and the individual observations are time points, "nested" within people.
The reason for this is including person fixed effects accounts for ALL possible between-person variation. This is great for when you are really interested in within-person variation, because you don't have to worry about ANY person level confounders. But in your case one of those person level differences is what treatment they got! So as you note trying to include a treatment variable along side person fixed effects will cause perfect multicollinearity and lead to the treatment variable being dropped.
So as you say, you need to use a random effects model. This in turn means that if you are worried about other person-level confounders (for example if older people were more likely to get treatment A) you also need to include variables for those confounders in your model.
A: I'm not familiar with plm, but I would assume that the between option runs your model on the group means such that you are only explaining between group variance in your outcome. That may be appropriate if that is the only variance of interest, but many people are interested in explaining both within and between outcome variance, and therefore use random effects models. You can always group mean center your within variables and add the group means of the predictors to your random effects model to get the best of both worlds!
