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

st: Kaplan Meier


From   "Butt, Adeel" <ButtA@dept-med.pitt.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: Kaplan Meier
Date   Sat, 28 Aug 2004 12:52:27 -0400

Title: Kaplan Meier

I am a new statalist user. I had a much simpler question:

I am working on a Cox model. I stset the dataset appropriately for failure (death) and the model ran okay, as expected. The follow-up time in the dataset is about 12 years. However, when I ran the Kaplan-Meier survival curves, the x-axis shows a follow-up period of almost 40 years. I entered the entry time, origin time, but neither fix the problem.

Any suggestions.

Adeel A. Butt
 
Assistant Professor of Medicine and Infectious Diseases
University of Pittsburgh School of Medicine

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Suzy
Sent: Saturday, August 28, 2004 12:32 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Re: destringing

Hi Daniel,
I have looked at the UCLA website - it's very good and I've used it
before. I'll go through it again on this topic. Thanks too for the other
tips.  I think it's true that most of the learning happens through trial
and error and then some handholding by others who have been there. I
appreciate your time and insight on this topic.
Suzy

Daniel Egan wrote:

>Hi Suzy,
>A couple of points:
>1) instead of
>tab dxcode1 if dxcode1==V3000
>use
>tab dxcode1 if dxcode1=="V3000"
>
>this tells stata that what it is tabulating is a string variable. This is
>true for all of your string variables, i.e. any one that was read in as
>"strX".
>
>2) I would highly suggest taking about 1 hour to go through the relevant
>modules at http://www.ats.ucla.edu/stat/stata/modules/default.htm . This
>will give you a very useful overview of Stata datatypes, and how to
>manipulate them as well as do various things
>
>3) I would also strongly suggest that when doing analyses, you have your
>"raw" dataset (i.e. what you -infiled- and saved), which is NEVER saved
>over. Doing a "save-as" on the datasets once you have put them in analytic
>format, like "Foo-A.dta". This prevents the over writing, and ties in with
>my next point.
>
>4) Look into using .do files for all of this - it allows you to 1) keep
>track of what you have done, and look through your code quickly for problems
>fix them, and rerun what you have done on the "raw" dataset, and 2) gives a
>very easy replication file for anyone who is looking to proof your work.
>
>5) Once comfortable with it, look into using -encode-.
>
>All things which I learned painfully on my own....
>
>Dan
>*
>*   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/
>
>

>


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index