Stata 4, Survival - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Stata 4, Survival

Description:

Time = time since diagnosis in years: ... stcurve, survival at1(gender=1 cohab=1 partfrq=0) at2(gender=2 cohab=1 partfrq=0) 17 ... – PowerPoint PPT presentation

Number of Views:138
Avg rating:3.0/5.0
Slides: 20
Provided by: heins1
Category:
Tags: at1 | stata | survival

less

Transcript and Presenter's Notes

Title: Stata 4, Survival


1
Stata 4, Survival
  • Hein Stigum
  • Presentation, data and programs at
  • http//folk.uio.no/heins/

2
Agenda
  • Kaplan-Meier plots
  • Cox regression
  • Example
  • Age at first intercourse

3
Survival data
Outcome
  • Unajusted analysis
  • Kaplan-Meier
  • Regression method
  • Cox-regression

4
Survival data setup
  • Status and time
  • generate status!missing(DebutAge)
  • generate timeDebutAge
  • replace timeAge if status0
  • generate time2timeuniform() avoid ties
  • Set and describe
  • stset time, failure(status1) Set data
  • stdes Describe

5
Setting the timescale
Time time since diagnosis in years stset
dateexit, failure(dead1) origin(datediag)
scale(365.25)
Time age in years stset dateexit,
failure(dead1) origin(datebth) enter(datediag)
scale(365.25)
6
Mathematical functions
  • Standard distribution functions
  • Time to event T
  • Density f(t)
  • Cumulative density F(t)
  • Survival functions

7
Some relationships
8
Kaplan-Meier
  • Survival function
  • Syntax
  • sts graph, by(sex) KM survival plot
  • sts test sex log-rank test
  • stci, p(50) by(sex) time to 50 failure
  • sts list, at(5 10 30) survival at time 5,

9
Kaplan-Meier, all
sts graph, fail gwood tmin(8) tmax(30) noorigin
Age at 50 failure stci, p(50) 18.4 (18.1,18.8)
10
Kaplan-Meier, by sex
sts graph, fail by(gender) tmin(8) tmax(30)
noorigin
Age at 50 failure stci, p(50) by
(gender) Males 18.6 (18.3,19.0) Females
18.1(17.8,18.9)
Log-rank test sts test gender p-value0.3
11
Hazards
sts graph, hazard by(gender) width(2)
12
Cox regression
  • Model
  • Syntax
  • stcox x1 x2
  • Proportional hazard test
  • stcox x1 x2, schoenfeld(sc) scaledsch(ssc)
  • estat phtest, detail
  • estat phtest, plot(x1)

13
Full model
stcox gender cohab partfrq
14
Proportion hazard test
Save residuals stcox gender cohab partfrq,
schoenfeld(sc) scaledsch(ssc) Test estat
phtest, detail
15
Smoothed Schoenfeld residuals
estat phtest, plot(cohab)
16
Baseline hazard
stcox gender cohab partfrq, basesurv(bsurv)
basehc(bhaz) stcurve, hazard at(gender1 cohab1
partfrq0) range(8 30) width(1)
17
Predicted survival
stcurve, survival at1(gender1 cohab1
partfrq0) at2(gender2 cohab1 partfrq0)
18
If proptional hazard fails
  • Stratified Cox regression
  • Separate analysis on time intervals
  • Time dependent covariats
  • Additive model

19
Some Cox options
  • stcox drug age, strata(sex) Stratified
  • stcox drug age, shared(family) Frailty
  • stcox drug age, tvc(varlist) Timevar cov
Write a Comment
User Comments (0)
About PowerShow.com