Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: parmby: obtaining exponentiated results from Cox regression


From   Michael McCulloch <[email protected]>
To   Statalist <[email protected]>
Subject   st: parmby: obtaining exponentiated results from Cox regression
Date   Tue, 17 Oct 2006 10:20:16 -0700

Hello,
GOAL:
I am using -parmby- to list results of several different Cox regression models. As I am planning to compare many different models, I would like to ask how to efficiently display that hazard ratios and their confidence intervals, without needing to manually transform them.

PROBLEM:
Whether or not I specify -nohr- option during the Cox regression, -parmby- gives me the coefficients in both cases, whereas I would like to display the coefficients in one line, and the hazard ratios in the other.

COMMAND SEQUENCE:
*run models with and without hazard ratio
parmby "stcox var1", lab saving (tf1, replace) idn(1) ids(Hazard ratio)
parmby "stcox var1, nohr", lab saving (tf2, replace) idn(2) ids(no hazard ratio)
dsconcat tf1 tf2
* format effect size & confidence intervals to 2 decimal places
format estimate min* max* %8.2f
* format p-value to 2 decimal places
format p %8.2e
*concise table of results
list estimate min95 max95 p if parmseq==1, clean noobs

RESULT:
idstr estimate min95 max95 p
Hazard ratio -0.68 -0.99 -0.37 1.4e-05
no hazard ratio -0.68 -0.99 -0.37 1.4e-05





Best wishes,
Michael McCulloch


____________________________________

Michael McCulloch
Research Director, Pine Street Foundation
124 Pine Street, San Anselmo, CA 94960-2674
tel 415.407.1357
fax 415.485.1065
email: [email protected]
web: www.pinestreetfoundation.org

*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index