I need the regression output by three columns Full Sample , Rural and Urban for each dependent variable (separate variable)
I am using the following code but not getting the required output, please
foreach mortality in neonatal infant child {
/* All observations */
ivreg2 `mortality'_mortality ${child_vars} ${mother_vars} ${household_vars} (PM2_5 = night_inversions)
estadd local ysumm_label "Mean `mortality' mortality (per 1000 births)"
estadd matrix ysumm = r(mean)
esttab using abc.csv, append cells(b(star fmt(3)) se(par fmt(3))) stats(ysumm widstat N) ///
collabels(none) title("Impact of Air Pollution on `mortality' Mortality") ///
modelwidth(12) label nodepvars nomtitles ///
keep(PM2_5)
/* Rural areas only */
ivreg2 `mortality'_mortality ${child_vars} ${mother_vars} ${household_vars} (PM2_5 = night_inversions) if rural == 1
estadd local ysumm_label "Mean `mortality' mortality (per 1000 births)"
estadd matrix ysumm = r(mean)
esttab using abc.csv, append cells(b(star fmt(3)) se(par fmt(3))) stats(ysumm widstat N) ///
collabels(none) title("Impact of Air Pollution on `mortality' Mortality (Rural Areas Only)") ///
modelwidth(12) label nodepvars nomtitles ///
keep(PM2_5)
/* Urban areas only */
ivreg2 `mortality'_mortality ${child_vars} ${mother_vars} ${household_vars} (PM2_5 = night_inversions) if rural == 0
estadd local ysumm_label "Mean `mortality' mortality (per 1000 births)"
estadd matrix ysumm = r(mean)
esttab using abc.csv, append cells(b(star fmt(3)) se(par fmt(3))) stats(ysumm widstat N) ///
collabels(none) title("Impact of Air Pollution on `mortality' Mortality (Urban Areas Only)") ///
modelwidth(12) label nodepvars nomtitles ///
keep(PM2_5)
}
I am trying to provide the data using dataex command and getting the following error message please
. dataex age neonatal_mortality infant_mortality child_mortality male_child birth_order birth_weight birth_weight_record twi
> n child_age pregnancy_duration mother_age mother_education mother_height father_education wealth_index rural male_head hea
> d_age piped_water clean_fuel open_defecation frac_OD_village electricity religion caste household_size total_children PM2_
> 5 night_inversions child_month child_year
input statement exceeds linesize limit. Try specifying fewer variables
r(1000);
Related Posts with Regresion output code help
custom maximum likelihood estimators - best way to check for convergence?I've made a package to estimate a model by maximum likelihood. I'd like to store a result as e(conve…
Dropped year-dummies in panel regressionDear Statalisters, I have some issues understanding year-dummies being dropped in a fixed effects …
Pairwise matching: first nearest neighbourHi, I'm new on Stata and I have some difficulties to realise a pairwise matching. Here is a simplifi…
How to test if the mean of a sample is significantly different from zeroHi everyone, I have a sample of 166 bonds (i.e. n=166). I have broken these down into subsamples ba…
estimation sample variesGood day, I get following error message Code: bys id: gen treatment=0 if (expectation==2 & f.…
Subscribe to:
Post Comments (Atom)
0 Response to Regresion output code help
Post a Comment