07.02.2014 Views

Introduction to Stata 8 - (GRIPS

Introduction to Stata 8 - (GRIPS

Introduction to Stata 8 - (GRIPS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

. summarize<br />

Variable | Obs Mean Std. Dev. Min Max<br />

-------------+-----------------------------------------------------<br />

lbnr | 48 24.5 14 1 48<br />

.... |<br />

risktime | 48 1.291667 .8546908 .0833333 3.25<br />

died | 48 .6458333 .4833211 0 1<br />

_st | 48 1 0 1 1<br />

_d | 48 .6458333 .4833211 0 1<br />

_t | 48 1.291667 .8546908 .0833333 3.25<br />

_t0 | 48 0 0 0 0<br />

. save c:\dokumenter\proj1\st.cancer1.dta<br />

Four new variables were created, and the st'ed data set is prepared for a number of incidence<br />

rate and survival analyses:<br />

_st 1 if the observation includes valid survival time information, otherwise 0<br />

_d 1 if the event occurred, otherwise 0 (censoring)<br />

_t time or age at observation end (here: risktime)<br />

_t0 time or age at observation start (here: 0)<br />

Summary of time at risk and incidence rates<br />

stptime , by(drug) per(1000) dd(4)<br />

stptime , at(0(1)5) by(drug)<br />

[ST] stptime<br />

// rates x 1000, 4 decimals<br />

// 1-year intervals<br />

A table of the survivor function:<br />

sts list , by(drug) compare at(0(0.5)5)<br />

[ST] sts list<br />

// ½ year intervals<br />

The corresponding graph:<br />

[ST] sts graph<br />

sts graph , by(drug)<br />

To obtain a cumulative incidence (1–S) graph displaying the interval 0-0.25 at the y-axis:<br />

sts graph , by(drug) failure ylabel(0(0.05)0.25)<br />

A logrank test comparing two or more groups:<br />

sts test drug<br />

[ST] sts test<br />

Cox proportional hazards regression analysis:<br />

stcox drug01<br />

xi: stcox i.drug<br />

// drug dicho<strong>to</strong>mized<br />

// 3 drugs<br />

[ST] stcox<br />

35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!