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
Keep the first observation within a moving 30-day windowI have the following dataset. I want to keep d=1 for the first observation within 30-day moving wind…
summary forest plot for meta-analysisHello, I am doing a study-level meta-analysis with different outcomes. In addition to the standard …
2:Setting manual coefficientsHi Listers, Y = β1+ β2*Area + β3Labor + β4*Fertilizer + u This time its given that B4=3*B3. Which …
Effect of schooling on menstruation methodsHello, I am trying to find the effect of schooling on mensuration methods from Indian context.These …
Applying Bai-Perron Test to Time Series data structured in panel format Hello, I have a panel dataset where data is there for each country. I want to run the stata command…
Subscribe to:
Post Comments (Atom)
0 Response to Regresion output code help
Post a Comment