What I have made so far is the second table, What I Made So Far.
How could I make the wanted table?
Array
Array
The Stata code is below.
Code:
sysuse citytemp.dta
eststo ols: reg tempjan heatdd cooldd if region==3
    estadd local Controls "No"
eststo q1:     qreg tempjan heatdd cooldd tempjuly if region==3, q(0.5)
    estadd local Controls "Yes"
eststo q2:     qreg tempjan heatdd cooldd if region==3, q(0.5)
    estadd local Controls "No"
eststo q3:     qreg tempjan heatdd cooldd tempjuly if region==4, q(0.5)
    estadd local Controls "Yes"
esttab ols q1 q2 q3 using "example.tex", ///
    title(What I made so far \label{ex}) ///
    b(%9.3f) se(%9.3f) ///
    se nomtitles nocons noobs label replace scalars("Controls") ///
    mgroups("OLS" "Quantile", pattern(1 1 0 0) ///
        prefix(\multicolumn{@span}{c}{) suffix(}) ///
        span erepeat(\cmidrule(lr){@span}))Code:
\documentclass[12pt, letterpaper]{article}
\usepackage{booktabs}
\newcommand{\sym}[1]{#1}
\begin{document}
    \input{example_wanted.tex}
    \input{example.tex}
\end{document}
0 Response to Spanning the columns of the each of two rows using esttab
Post a Comment