Hello Statalist! This is my first ever post, and I am newly learning Stata as a somewhat-competent user of SPSS.
I am hoping to figure out the best way to 'control' for race in a linear regression, where I am trying to predict GPA, with my independent variables being resil, motiv, work, debat, creat (all measures of non-cognitive skills, essentially). I've recoded income and also recoded gender where 0 represents male and 1 represents female.
If someone could please help me with the code for how the best method of handling my race variable (w is white, h is hispanic, and so on), and then for the ensuing regression, I would be eternally grateful! Thank you.
* Example generated by -dataex-. To install: ssc install dataex
clear
input double gpa str1 race byte(resil motiv work debat creat income gender1)
2.07 "B" 3 1 1 1 1 14 0
3.03 "H" 1 1 1 1 1 4 0
3.07 "H" 1 1 5 5 5 5 1
2.66 "H" 5 1 1 3 1 13 0
3.00 "A" 3 4 1 2 1 9 1
3.04 "B" 5 3 1 1 5 14 1
3.02 "A" 1 1 4 1 1 14 1
2.04 "B" 4 1 1 1 1 5 0
3.00 "H" 4 4 1 1 3 14 0
3.02 "W" 4 1 1 1 1 4 0
3.42 "H" 1 4 1 3 5 13 1
3.66 "H" 5 3 1 4 3 7 1
3.02 "W" 4 1 1 1 1 14 0
3.04 "A" 1 2 5 1 1 14 1
3.26 "H" 5 1 1 1 1 8 1
3.45 "A" 5 1 5 1 3 14 1
2.03 "W" 3 1 1 1 4 14 1
3.01 "A" 5 1 4 1 2 9 0
end
[/CODE]
Related Posts with Controlling for gender in linear regression
What happens if the lags of dependent variables are not significant in system GMM regression?Dear all, I am using xtabond2 to estimate my model. Although the coefficent of interest variable is…
Replace String VariableHi, I have a missing string variable: STRING YEAR 1990 How can I write a text "AAA" in the missi…
Interpret Hansen J statistic and other tests following ivreg2 command in stataDear all, Could you please help me to interpret some tests from ivreg2 command as follows: Code: …
Interpretation of an interaction term when coefficient of one of the constitutive term is missingGreetings, I am having a debate with a friend about some regression results. Say two independent var…
Dynamic Spatial Panel Model with XSMLE "Convergence Not Achieved"Dear Stata Users, I am trying to analyze the impact of minimum wages on employment (divided into fo…
Subscribe to:
Post Comments (Atom)
0 Response to Controlling for gender in linear regression
Post a Comment