I have been struggling to get Stata to output my regression results, and have tried the eststo commands and outreg2 commands. My code is as follows. I also thought of using parmest but do not know how to tell Stata to put output in 1 file for all 50 states and for each of the 5 levels of the "riskfactors" variable. I want the odds ratios, confidence intervals and p-values in my tables.
set more off
levelsof _state, local(states)
foreach _state of local states {
display _newline(2) "State=`_state'"
xi: svy, subpop(if _state==`_state' & riskfactors!=.): logistic fphlth i.riskfactors
}
Any help would be much appreciated! I am fairly new to Stata and data analysis.
set more off
levelsof _state, local(states)
foreach _state of local states {
display _newline(2) "State=`_state'"
xi: svy, subpop(if _state==`_state' & riskfactors!=.): logistic fphlth i.riskfactors
}
Any help would be much appreciated! I am fairly new to Stata and data analysis.