In my case, I am finding pscore for doing PSM. To get there, I need to run the logistic regression to get the pscore.In my setting, I have 7 countries, all firms in country A have the "treatment" variables equal to 1, otherwise 0. My logit regression is
xtset firm year
xtlogit treatment firm-level-variables country-level-variables i.year, fe
while treatment equal to1 if firms in country A and 0 otherwise. firm-level-variables includes firm size, firm age... country-level variables include lngdp, unemployment ....
When running the regression
Code:
xtlogit treatment firm_age i.year, fe
I got the error immediately
Code:
outcome does not vary in any group
So, I asked myself and think this means that in at least one group, all observations have either a 0 or a 1 as the outcome variable. It makes sense because all observations of firms in country A will have treatment =1 and all observations of firms in other countries will have treatment=0, so they wont vary.
I am not sure whether my understanding is correct. If it is the case, would you please guide me how to overcome the problem. Thank you.