Hi:
I'm having difficulty in getting the code I've developed to run successfully. Basically I'm trying to run a loop of regressions (Log Poisson) with mi commands and svy commands. I keep obtaining either one of these error codes [required r(100); or invalid syntax r(198)]. Below is the fragment of code:
foreach dv of varlist smokenow exercise obese hivtest colonoscopy sad emotional trbsleep {
foreach level in `sexid2' {
foreach var of varlist race sex nbtenure hispanic edlevel marstat immigrant nohi srvy_yr age_p {
mi estimate, or post : svy linearized : logit `dv' ib`level' `var', eform
outreg2 using "C:\Users\ortiz_000\Documents\Data\NHIS\Neighb orho odCohesionAll2.xls", append sideway bdec(2) cdec(2) label symbol(***, **, *) alpha (.001, .01, .05) stats(coef ci) eform cti("Model 1b, Smoker")
}
}
}
Also, it would be really helpful if I could get this to work with direct export to Word but Excel works only for me. Lastly, when the results are input into Excel in a series of regression, the results are not sequentially in the same rows. For example if I have 4 regression models, the 2nd model will be placed in the column directly adjacent to the 1st model but yet start in the immediate row following the previous model. If outreg2 is more cumbersome, I'd be extremely interested to see if anyone has a means for achieving this using estout.............
I'm having difficulty in getting the code I've developed to run successfully. Basically I'm trying to run a loop of regressions (Log Poisson) with mi commands and svy commands. I keep obtaining either one of these error codes [required r(100); or invalid syntax r(198)]. Below is the fragment of code:
foreach dv of varlist smokenow exercise obese hivtest colonoscopy sad emotional trbsleep {
foreach level in `sexid2' {
foreach var of varlist race sex nbtenure hispanic edlevel marstat immigrant nohi srvy_yr age_p {
mi estimate, or post : svy linearized : logit `dv' ib`level' `var', eform
outreg2 using "C:\Users\ortiz_000\Documents\Data\NHIS\Neighb orho odCohesionAll2.xls", append sideway bdec(2) cdec(2) label symbol(***, **, *) alpha (.001, .01, .05) stats(coef ci) eform cti("Model 1b, Smoker")
}
}
}
Also, it would be really helpful if I could get this to work with direct export to Word but Excel works only for me. Lastly, when the results are input into Excel in a series of regression, the results are not sequentially in the same rows. For example if I have 4 regression models, the 2nd model will be placed in the column directly adjacent to the 1st model but yet start in the immediate row following the previous model. If outreg2 is more cumbersome, I'd be extremely interested to see if anyone has a means for achieving this using estout.............
Comment