Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: generating Latex Odds ratio and CI table using esttab


From   ann montgomery <[email protected]>
To   [email protected]
Subject   st: generating Latex Odds ratio and CI table using esttab
Date   Mon, 31 Jan 2011 15:43:44 -0500

Hi,

Problem: I'd like to generate the OR results (and the 95%CI and p-value) of
several univariate analyses in a Latex readable table from a population
survey. How can I generate multiple OR CI p-values for variable1 versus var2
var3...var...? However, I get the output of the coefficient only, for
last variable containing the logistic calculation...Thanks in advance,
Ann Montgomery UToronto

I use Ben Jann (2008) esttab:

*first I survey set the data
.svyset [pweight= survey_weight]

*then I clear the eststo command
.eststo clear

*then I store my first estimate
.eststo svy: logistic var1 var2

*and my second estimate
.eststo svy: logistic var1 var3

*then using esttab, saving to a Latex readable .tex file, I get the
regression coefficients and p-value estimates for var3 only (not the OR &
CI)

.esttab using example.tex, replace label nostar page title(2x2
Tables\label{tab1}) eform

----------------------------
                  (1)
                 var1
----------------------------
var1
var3               0.272***
               (3.39)

_cons              -5.562***
             (-84.00)
----------------------------
N                  158295
----------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001

***the Latex file looks like this

% 30 Jan 2011 11:35:17

\documentclass{article}

\begin{document}

\begin{table}[htbp]\centering

\caption{2x2 Tables\label{tab1}}

\begin{tabular}{l*{1}{c}}

\hline\hline

&\multicolumn{1}{c}{(1)}\\

&\multicolumn{1}{c}{Case-control}\\

\hline

Case-control & \\

var3& 0.115\\

& (-29.63)\\

\hline

Observations & 98655\\

\hline\hline

\multicolumn{2}{l}{\footnotesize Exponentiated coefficients; \textit{t}
statistics in parentheses}\\

\end{tabular}

\end{table}

\end{document}
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index