Right now I have a standard OLS model with one year of data, and I'm interested in the coefficient for charter schools. My dependent variable is test scores. I currently have Charter schools =1 if charter school and =0 if public school. I control for other variables like demographics, funding, etc. I thought I could make things more interesting with panel data, but I am getting pretty stuck.

First off, I'm focused on my independent variable for Charter schools and since it's time-invariant, it drops from fixed effects. I think this is an issue because it's my most important independent variable. I've tried a few things:

encode SchoolName, gen(SchoolName_2)

xtset SchoolName Year, yearly


Then I tried these different regressions:

xtreg Y_dep X_ind i.Year, re(don't think random effects is appropriate, ran the hausman)


xtreg Y_dep X_ind i.Year, fe


xtreg Y_dep X_ind i.Year, fe vce(cluster SchoolName_2) and xtreg Y_dep X_ind i.Year, fe vce(robust)


reg Y_dep X_ind i.Year i.SchoolName_2, vce(cluster SchoolName_2)




Not sure if running a regular regression and just clustering errors by School ID (SchoolName) would be the best route, or if it even leads to anything that makes sense. Is it possible to run a regression using panel data when my binary independent variable Charter School is my variable of interest? I have data for 4 years, about 1200 schools.

Does it make sense to try and find a coefficient for each individual school? I noticed a lot of independent variables also become insignificant with my panel data, compared to my single year OLS where most variables are significant. I'm aware there's a few limitations with my model, but I feel like there might be a serious issue with it that I'm not grasping.

Thanks in advance for your advice.