Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Follow up: cox models in SAS and STATA



This is a follow-up message to my recent post re: coding cox models in
SAS and Stata (original message copied below).  Thanks to helpful
feedback from the list regarding differences in how failure events are
coded in the two programs (my original message below has been edited to
reflect this feedback), I am now showing the same number of failures in
the two programs.  But I'm still getting different values for the
coefficients!  I've confirmed that the data has transferred properly
from one program to the other, and that records with missing variables
that are being dropped in Stata are also dropped in SAS.  What else
could be the problem?!?  

Thanks, again, to anyone who knows both SAS and Stata code for taking a
2nd look at this ...

Tom

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ORIGINAL POST (posted to statalist on 5/28):


I have data on companies' waiting time to different "milestones"
(reaching $XX in revenue, having an IPO, etc.).  I inherited the data
and code in SAS format, and I'm trying to recreate the SAS proportional
hazard (i.e. cox) models in Stata.  But I can't get the coefficients to
come out even remotely close (and I don't mean rounding errors ... these
values are way off).  Can someone who knows both SAS and Stata code can
take a look at the two versions, below, and tell me what might be wrong
with my Stata translation (since I'm to assume that the SAS version is
correct)?  Below I note only what I think are the relevant lines, and
simply list the independent variables as iv1, iv2, iv3 ... but I can
provide more detail if needed.  

SAS version:
proc phreg;
model time10y*censor10 (1) =
iv1 iv2 iv3;

Stata version:
stset time10y, failure(censor10==0)
stcox iv1 iv2 iv3, nohr

**********************************************
Thomas P. Moliterno
Graduate School of Management
University of California, Irvine
[email protected]
**********************************************
*
*   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