Hello everyone.
I am new to Stata and this is my first post on Statalist. I’m still learning how to use the software, and Statalist has been extremely helpful so far! However, I’m in a situation in which previous lists’ answers haven’t been able to help me advance.
For context, I am using Stata 12 in a Windows 8 PC in a firewalled server. I am not able to install packages at will, and need to request these installations (that take a very long time to be processed, as in weeks). Therefore, I have a strong preference for non community-contributed commands. I’m afraid I cannot provide data samples, also due to the firewall on protected data.
I have a database on 12th grade students’ math and reading test scores and other covariates for five consecutive years. I also have information on the schools (school_id) and classrooms (class_id) these students are enrolled in, the principal (principal_id) leading the school in that particular year and math and reading teachers (math_id and read_id) teaching these 12th grade classrooms. There are also school, teacher and principal covariates. This database has 203K observations and around 160 available variables, most of which I will not use.
I wish to run a regression with multiple fixed effects. My objetive here is to obtain the principal fixed effect, which will be the dependent variable in a later step of my research. I have several questions on what is the best way to approach this.
The simpler regression I inted to run is of math test scores against school controls and principal, school and math teacher fixed effects. Currently, I have the following approach:
where `school_controls` are variables to control for time-varying school effects (12 variables).
The below questions are currently hauting me:
Thank you in advance!
I am new to Stata and this is my first post on Statalist. I’m still learning how to use the software, and Statalist has been extremely helpful so far! However, I’m in a situation in which previous lists’ answers haven’t been able to help me advance.
For context, I am using Stata 12 in a Windows 8 PC in a firewalled server. I am not able to install packages at will, and need to request these installations (that take a very long time to be processed, as in weeks). Therefore, I have a strong preference for non community-contributed commands. I’m afraid I cannot provide data samples, also due to the firewall on protected data.
I have a database on 12th grade students’ math and reading test scores and other covariates for five consecutive years. I also have information on the schools (school_id) and classrooms (class_id) these students are enrolled in, the principal (principal_id) leading the school in that particular year and math and reading teachers (math_id and read_id) teaching these 12th grade classrooms. There are also school, teacher and principal covariates. This database has 203K observations and around 160 available variables, most of which I will not use.
I wish to run a regression with multiple fixed effects. My objetive here is to obtain the principal fixed effect, which will be the dependent variable in a later step of my research. I have several questions on what is the best way to approach this.
The simpler regression I inted to run is of math test scores against school controls and principal, school and math teacher fixed effects. Currently, I have the following approach:
Code:
xi: reg math_score `school_controls` i.principal_id i.school_id i.math_id, vce(robust) noomit
The below questions are currently hauting me:
- Since the fixed effect coefficients for all principal_id categories (every principal) are my parameters of interest, I do not want any principal to me omitted. I understand both the -xi:- prefix and the -noomit- suffix accomplish this. Is this approach correct?
- I am not using the -xtreg,fe- as I understand this would include fixed effects for students, which is what uniquely identifies the panel I have. This is why I am not using the -xt- class commands (as in -xtset- and -xtreg-). Should I reconsider the -xt- class commands?
- I would like to save these principal fixed effects coefficients (around 1000 distinct principals). Ideally, I'd have a dataset with all pincipal_id and their respective FE coefficients from the regression. How could I store these coefficients with the respective principal_id in the same database used for the regression, or in another with just these two information? (I have found many answers recommending outreg2, and even though I have requested it to be installed, Idoubt it will be available to me anytime soon).
Thank you in advance!
Comment