Hello,
Our data consists of 270 unique firms over a 20 year period (3300 firm-year specific observations).
We have a problem in the steps following up to a PSM-model, where the xtlogit command does not allow me to cluster on entity level. The variable "treat" is a dummy variable taking value 1 if the firm has at least one female director; 0 otherwise. We want to estimate a propensity score which matches observations on the control variables.
We want to have fixed effects on industry and year while clustering on entity level, this does not seem to work as "panels are not nested within clusters". The command "nonest" solved the problem when using xtreg but does not seem to work in xtlogit.
error: panels are not nested within clusters
r(498);
Best regards.
Our data consists of 270 unique firms over a 20 year period (3300 firm-year specific observations).
We have a problem in the steps following up to a PSM-model, where the xtlogit command does not allow me to cluster on entity level. The variable "treat" is a dummy variable taking value 1 if the firm has at least one female director; 0 otherwise. We want to estimate a propensity score which matches observations on the control variables.
We want to have fixed effects on industry and year while clustering on entity level, this does not seem to work as "panels are not nested within clusters". The command "nonest" solved the problem when using xtreg but does not seem to work in xtlogit.
Code:
egen panel_id = group(Industry Year) sort Companyname egen company_id = group(Companyname) xtset panel_id xtlogit treat logBS_w Performance_w logSIZE_w LEV_w CEOinboard Retearnings_w, i(panel_id) nonest vce(cluster company_id)
r(498);
Best regards.
Comment