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
margins after ereturn post with -npregress-I am running a nonparametric kernel regression where the dependent variable is transformed using the…
Treatment and Period omitted because of collinearity (DiD)Dear Statalist Community, I am hopeful that you help me on this one as you did before. I have a mis…
re-arrange dataHi, I have this type of table in Stata: industry_id period_1 period_2 sales_1 sales_2 11 1 0 10…
AREG - Different resultsDear all, I just launch several estimations using areg command on stata. I'm surprise since I launc…
Centering variables in panel dataHello everyone, I have an unbalanced panel data at subnational level based on survey years which d…
Subscribe to:
Post Comments (Atom)
0 Response to Help with Regression Commands
Post a Comment