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
Regression output - Bug?Hi everyone, I am trying to run some old code (version 14.2) using a new Stata version (15.1) on a …
Pie graph with 12 variants of answers recorded in three columnsHello! I have a spreadsheet. 17 respondents answered on the question, where should be selected 3 var…
Converting string var to clock var, where seconds don't agreeI am trying to compare two times, measured in YMD, hms format, to see if they are the same. As the …
How to generate new variable based on certain conditions?Hi Statalist, I am stuck with a very silly problem which I am unable to work out. Please consider th…
Precise Interpretation of Difference in Difference Regression CoefficientsI am new to econometrics and want to verify that I have the correct precise interpretation for the c…
Subscribe to:
Post Comments (Atom)
0 Response to Help with Regression Commands
Post a Comment