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]

Re: st: stata list question regarding truncating Cox regression

From   Steve Samuels <>
Subject   Re: st: stata list question regarding truncating Cox regression
Date   Fri, 29 Jun 2012 13:22:34 -0400

Suppose "otime" is the "time" variable you used in -stset-.  Create a new variable:

gen time5= cond(otime<=5, otime, .)
stset time5  // fill in the rest
stcox   //fill in the rest


On Jun 29, 2012, at 1:04 PM, Lisa Davis wrote:

 I'm trying to do a Cox regression with a limited number of subjects
(n=1050) who are participating in a registry, and my observation time
ranges from approximately 3-5 years, with a few outliers who have been
in the registry 7 years. As there are few participants who have had
observation time greater than 5 years, I am trying to truncate my
analysis at 5 years. I have been able to manually manipulate my
variables to do this, but I'm sure that there is a command that I have
not found/ not known how to search for that can do this. Any

 Lisa Davis
Rheumatology Instructor
University of Colorado
*   For searches and help try:

*   For searches and help try:

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