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
convergent validityHow would I calculate the convergent validity of two diagnostic tests where both outcome measures ar…
MGARCH DVECH for panel dataDear all, I am trying to estimate Diagonal VECH GARCH(1,1) model for a panel of 600 firms (ID) and …
Counting observations over duplicate datesHi all, I'm an economics student in college, doing my best to learn STATA. I've browsed the forum a…
Using bayesstats summary on pooled multiple chain data.Dear Statalisters, Is there a way to summarize amalgamated data from multiple chains with bayesstats…
Hausman testI want to investigate if I have to use a random effects or fixed effects model. Therefore I run the …
Subscribe to:
Post Comments (Atom)
0 Response to Help with Regression Commands
Post a Comment