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
Likert normalizationHi - I'm helping my son with his science fair project. He did placebo taste testing where he has so…
Benchmarking Stata to Test Speed Across Computers and VersionsAfter helping my son upgrade his gaming machine, I decided it was time to upgrade my 8-year old desk…
How to find data points lying above regression line within distance less than max[1SE, 1mm]? Hello Statalists, I have data points (units in mm) and have performed regression on it. Now I need…
Efficient construction of loop commands involving strmatch() when numlist values have leading zeroesHi All, running Stata 15.1 I am attempting to use a list of two-digit numeric prefixes to tag obser…
Shaded area xtline graphDear Statalisters, Currently I am working on a panel dataset where my probit model predicts either …
Subscribe to:
Post Comments (Atom)
0 Response to Regresion output code help
Post a Comment