Hello everyone,
using Stata (14.1) I'm running three probit regressions which are only different in dependent variables. I'd like to present the marginal effects of interaction variables in each model in a single table with three side-by-side columns. The number of observations and the Chi-squared statistic for each model remain blank, even though I specify them in the esttab command.
I’d really appreciate any insights on how to fix this. Is sth wrong in my commands?—thanks in advance!
probit X1 $attitude $info $edu $country, vce(robust)
local pR2 = e(r2_p)
eststo margins_1: margins , dydx(*) post
probit X1 $attitude $info $edu $country c.env##i.income, vce(robust)
margins , dydx(env) at(income = (1 2 3 4)) post
estimates store het_income
eststo margins_2: xlincom income1vsincome2 = (2._at - 1._at) , post
estimates restore het_income
eststo margins_3: xlincom income1vsincome3 = (3._at - 1._at) , post
estimates restore het_income
eststo margins_4: xlincom income1vsincome4 = (4._at - 1._at) , post
running the same commands for X2 and X3
eststo outcome1: appendmodels margins_1 margins_2 margins_3 margins_4
eststo outcome2: appendmodels margins_5 margins_6 margins_7 margins_8
eststo outcome3: appendmodels margins_9 margins_10 margins_11 margins_12
esttab outcome1 outcome2 outcome3 using "C:\Users\.rtf", se(%4.3f) b(%4.3f) mtitles("x" "y" "z") stats(N chi2, labels("N" "Chi-squared") fmt(%4.0f %4.0f %4.2f)) star(* 0.10 ** 0.05 *** 0.01) varlabels(,elist(weight:_cons "{break}{hline u/width}")) nonotes addnotes("") compress replace
using Stata (14.1) I'm running three probit regressions which are only different in dependent variables. I'd like to present the marginal effects of interaction variables in each model in a single table with three side-by-side columns. The number of observations and the Chi-squared statistic for each model remain blank, even though I specify them in the esttab command.
I’d really appreciate any insights on how to fix this. Is sth wrong in my commands?—thanks in advance!
probit X1 $attitude $info $edu $country, vce(robust)
local pR2 = e(r2_p)
eststo margins_1: margins , dydx(*) post
probit X1 $attitude $info $edu $country c.env##i.income, vce(robust)
margins , dydx(env) at(income = (1 2 3 4)) post
estimates store het_income
eststo margins_2: xlincom income1vsincome2 = (2._at - 1._at) , post
estimates restore het_income
eststo margins_3: xlincom income1vsincome3 = (3._at - 1._at) , post
estimates restore het_income
eststo margins_4: xlincom income1vsincome4 = (4._at - 1._at) , post
running the same commands for X2 and X3
eststo outcome1: appendmodels margins_1 margins_2 margins_3 margins_4
eststo outcome2: appendmodels margins_5 margins_6 margins_7 margins_8
eststo outcome3: appendmodels margins_9 margins_10 margins_11 margins_12
esttab outcome1 outcome2 outcome3 using "C:\Users\.rtf", se(%4.3f) b(%4.3f) mtitles("x" "y" "z") stats(N chi2, labels("N" "Chi-squared") fmt(%4.0f %4.0f %4.2f)) star(* 0.10 ** 0.05 *** 0.01) varlabels(,elist(weight:_cons "{break}{hline u/width}")) nonotes addnotes("") compress replace
Comment