I am supposed to display a graph comparing the results by gender and students of multiple variables. It was a randomized study where certain students and faculty were sent a specific email.
The gender column in my .dta file is categorical. Male is listed as M. Female is listed as F.
I have tried the following code for the regression but it is not working in Stata.
Any help would be greatly appreciated?
tabulate gender, generate(gender)
set more off
foreach var opened_first clicked_first clicked Totalclick survey {
forvalues i=0(1)1 {
di "FEMALE" `var'"
reg `var' social_treatment if gender1==1 & social_treatment_student==`i'
estimates store gender1`i'
di "MALE" `var'"
reg `var' social_treatment if gender2==1 & social_treatment_student==`i'
estimates store gender2`i'
}
-end-
Related Posts with Help with Regression Commands
Change the unit size on Vertical AxisHi Stata Experts, I am using the code below to draw a quadratic graph. qui xtgee DV c.IV ##c.IV Co…
Code to run ttests and effect sizes on many variables at once?I have about 20 variables that I would like to conduct two sample t-tests (with unequal variances) a…
Loop over variables for each observationDear Listers, I have a dataset which looks like id es1 es2 es3 es4 es5 es6 es7 es8 es9 1 1 1 1 1 1…
Will Stata for Mac make the ARM transition?Apple is rumored to be announcing a future transition away from Intel-based processors to ARM proces…
Identifying houshold with all mebber of same characteristics (sex)Hi, I am trying to drop all houshold that contains all member of same sex but I am unable to perform…
Subscribe to:
Post Comments (Atom)
0 Response to Help with Regression Commands
Post a Comment