I'm trying to run a cross classified model using panel data and was hoping to get some help to verify if I'm on the right track (and get advice on my stata code).
My data looks at how student achievement is impacted by environmental factors, for simplicity sake let's just say it's air pollution. I have 4 years worth of data and in year 3, there was a major event that lead to a drop in air pollution during that year which started going up again in the 4th year.
Air pollution data was collected at the school level, and at the student neighbourhood level. Based on this structure, I believe I should be using a cross classified model.
Here's an example of my data:
With this data I believe time would be level 1, which is nested in student (level 2), which are both located in schools, and neighbourhoods (level 3).
Does this seem like a cross-classified application? If not, why not?
For my data, Mark is my dependent variable, and School and Home pollution, along with median income are the predictor variables.
In terms of implementing the cross-classified model in Stata, I've cobbled together some code based on the examples that I've seen in the online course from here:
xtmixed Mark i.time School_Pollution Home_Pollution Income || _all: R.SCHOOL || Student_Neighbourhood: Home_Pollution, mle variance
Is my thinking about this being a cross-classified data structure correct and would this modeling approach in Stata be the best way to move forward?