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
importing a .csv fileHi, I have a .csv file that the first row is variable names and the second row belongs to the corres…
Methods for computing the point-biserial correlationAfter reading this question on ResearchGate the other day, I installed -pbis- (net describe sg20, fr…
P-value not provided?!Hello, I was wondering why does my stata output for chi2 test doesn't give any p-value? I'm compari…
Difference in Difference model with panel data Dear, I have some questions about the difference-in-differences (DID) model with fixed effects. I …
Transposing selected observations from the same datasetHello, I want to change the layout of my dataset for only SOME observations (from long to wide). Not…
Subscribe to:
Post Comments (Atom)
0 Response to Regresion output code help
Post a Comment