|  |  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Estout for multiple heckman models
Hi all,
I have been using the estout code at the bottom of this message for a  
while with no problems.  However, when I recently changed some of the  
models from reg to heckman, I can no longer get all of them to  
display in the table.  The values in e( ) have the same name for both  
reg and heckman (the ones I want, at least), so I can't figure out  
why estout doesn't want to diaplay them together.  In fact, when I  
try to get only the heckman models to display it the same table, only  
the first one displays, with an extra row at the top containing the  
name of the dep. var. in the first column.  I have searched estout  
help to no avail, so any suggestions are greatly appreciated.
Matthew
My code:
***the first two regressions***
svy: reg foodbev black hispanic asian levexp educ_ref age_ref age2  
fam_size malehead femhead neurb mwurb surb wurb yeardum*
estimates store foodbev
estadd ysumm
svy: reg hous black hispanic asian levexp educ_ref age_ref age2  
fam_size malehead femhead neurb mwurb surb wurb yeardum*
estimates store hous
estadd ysumm
***the series of heckman regressions**
foreach v in cpe health trans entert learn persin cashco {
svy: heckman `v' black hispanic asian levexp educ_ref age_ref age2  
fam_size malehead femhead neurb mwurb surb wurb yeardum*, select 
(`selection')
estimates store `v', title ((6))
estadd ysumm
}
***trying to combine them all in an estout table (this works fine if  
the heckmans are changed to reg)***
estout foodbev hous cpe health transp entert learn persin cashco  
using "file_location", stats(r2 N ymean ysd, fmt(%9.2f %9.0f %9.0f % 
9.0f) ///
labels("R$^2$" "N. of obs." "Mean of Dep. Var." "S.D. of Dep. Var."))  
cells(b(star fmt(%9.2f)) se(par fmt(%9.2f))) label msign(--) ///
starlevels(* 0.10 ** 0.05 *** 0.01) keep(black hispanic asian levexp  
educ_ref age_ref age2 fam_size malehead femhead) ///
style(tex) title(Full Sample) collabels([dep]) mlabels(Food Housing  
CPE Health Transp. Entert. Edu. Pens./Ins. Contrib., span prefix 
(\multicolumn{@span}{c}{) suffix(})) ///
prehead("\begin{sidewaystable}\caption{@title}" "\begin{center}\begin 
{small}" "\begin{tabular}{l*{@M}{rr}}\hline") posthead(\hline) ///
prefoot("Year Effects&Yes&Yes&Yes&Yes&Yes&Yes&Yes&Yes&Yes\\ \\ Region  
Effects&Yes&Yes&Yes&Yes&Yes&Yes&Yes&Yes&Yes\\ \\ \hline" ) ///
postfoot("\hline" "\multicolumn{3}{l}{Robust Standard Errors in  
Parentheses} \\" ///
"\multicolumn{6}{l}{Significance levels: *10\%; ** 5\%; *** 1\%} \ 
\""\small\textit{Source:} CEx 1996-2002" ///
"\end{tabular}\end{small}\end{center}\end{sidewaystable}")
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/