Bookmark and Share

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

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

st: From: ann montgomery <>

Subject   st: From: ann montgomery <>
Date   Mon, 31 Jan 2011 15:35:15 -0500


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 &

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

var3               0.272***

_cons              -5.562***
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




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






Case-control & \\

var3& 0.115\\

& (-29.63)\\


Observations & 98655\\


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



*   For searches and help try:

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