Dear All,
Please help me on looping with "foreach".
I have error message of "too few quotes options not allowed r(101); end of do-file r(101)"
when I run this syntax:
data set is attached
where is my mistake?
Thanks,
Dastan
Please help me on looping with "foreach".
I have error message of "too few quotes options not allowed r(101); end of do-file r(101)"
when I run this syntax:
Code:
local allvars1 evolution_mn headsex headage h_size int_access assets ib5.region_sample child017 ib1.country ib1.wave
quietly mprobit `allvars1', baseoutcome (0)
outreg2 using "$base\Results\MICS_er_evolution.doc", replace ctitle({\b Total, Total}) title({\b Table 2A. Estimation Results of Multinomial Probit Models on Probability of Income Reduction by Waves (Coefficients)}) stats(coef se) label dec(3) sdec(3) addstat(LR, e(chi2), P-value, e(p), LogLik,e(ll)) addnote(Marginal effects are avalaible upon request)
foreach j of numlist 0/3 {
quietly mprobit `allvars1', baseoutcome (0)
quietly margins, dydx(_all) atmeans predict(pr outcome(`j')) post
outreg2 using "$base\Results\MICS_me_evolution.doc", append label ctitle({\b Total, outcome`j'}) title({\b Table 2. Estimation Results of Multinomial Probit Models on Probability of Income Reduction, Average Marginal Effects}) dec(4) sdec(3) stats(coef se)
}
data set is attached
where is my mistake?
Thanks,
Dastan

Comment