If I'm trying to run some regression models with this general format and save the main coefficients using regsave (from ssc):
In order to use regsave properly, I'd need the first time through this loop (with 'score' as the main predictor var) to be -ci replace-, and then every ensuing loop would use -ci append-. Is there some way to do this within the loop itself?
Code:
foreach var of varlist score behave attend teach { xtlogit outcome `var' i.year x2 x3, fe regsave using "Model output\outcomel.dta", addlabel(model, `var') ci append }
Comment