Stata 4 survival
This presentation is the property of its rightful owner.
Sponsored Links
1 / 19

Stata 4, Survival PowerPoint PPT Presentation


  • 130 Views
  • Uploaded on
  • Presentation posted in: General

Stata 4, Survival. Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/. Agenda. Kaplan-Meier plots Cox regression Example Age at first intercourse. Survival data. Outcome:. Unajusted analysis Kaplan-Meier Regression method Cox-regression. Survival data setup.

Download Presentation

Stata 4, Survival

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Stata 4 survival

Stata 4, Survival

Hein Stigum

Presentation, data and programs at:

http://folk.uio.no/heins/

H.S.


Agenda

Agenda

  • Kaplan-Meier plots

  • Cox regression

  • Example

    • Age at first intercourse

H.S.


Survival data

Survival data

Outcome:

  • Unajusted analysis

    • Kaplan-Meier

  • Regression method

    • Cox-regression

H.S.


Survival data setup

Survival data setup

  • Status and time

    generate status=!missing(DebutAge)

    generate time=DebutAge

    replace time=Age if status==0

    generate time2=time+uniform()avoid ties

  • Set and describe

    stset time, failure(status==1)Set data

    stdesDescribe

H.S.


Setting the timescale

Setting the timescale

Time = time since diagnosis in years:

stset dateexit, failure(dead==1) origin(datediag) scale(365.25)

Time = age in years:

stset dateexit, failure(dead==1) origin(datebth) enter(datediag) scale(365.25)

H.S.


Mathematical functions

Mathematical functions

  • Standard distribution functions

    Time to eventT

    Densityf(t)

    Cumulative densityF(t)

  • Survival functions

H.S.


Some relationships

Some relationships

H.S.


Kaplan meier

Kaplan-Meier

  • Survival function

  • Syntax

    sts graph, by(sex)KM survival plot

    sts test sexlog-rank test

    stci, p(50) by(sex)time to 50% failure

    sts list, at(5 10 30)survival at time 5,…

H.S.


Kaplan meier all

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)

H.S.


Kaplan meier by sex

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-value=0.3

H.S.


Hazards

Hazards

sts graph, hazard by(gender) width(2)

H.S.


Cox regression

hazard

baseline

RR

Cox regression

  • Model

  • Syntax

    • stcox x1 x2

  • Proportional hazard test

    • stcox x1 x2, schoenfeld(sc*) scaledsch(ssc*)

    • estat phtest, detail

    • estat phtest, plot(x1)

H.S.


Full model

Full model

stcox gender cohab partfrq

H.S.


Proportion hazard test

Proportion hazard test

Save residuals:

stcox gender cohab partfrq, schoenfeld(sc*) scaledsch(ssc*)

Test:

estat phtest, detail

H.S.


Smoothed schoenfeld residuals

Smoothed Schoenfeld residuals

estat phtest, plot(cohab)

H.S.


Baseline hazard

Baseline hazard

stcox gender cohab partfrq, basesurv(bsurv) basehc(bhaz)

stcurve, hazard at(gender=1 cohab=1 partfrq=0) range(8 30) width(1)

H.S.


Predicted survival

Predicted survival

stcurve, survival at1(gender=1 cohab=1 partfrq=0)

at2(gender=2 cohab=1 partfrq=0)

H.S.


If proptional hazard fails

If proptional hazard fails

  • Stratified Cox regression

  • Separate analysis on time intervals

  • Time dependent covariats

  • Additive model

H.S.


Some cox options

Some Cox options

stcox drug age, strata(sex)Stratified

stcox drug age, shared(family)Frailty

stcox drug age, tvc(varlist)Timevar cov

H.S.


  • Login