SURVIVAL ANALYSIS WITH STATA. DATA INPUT 1) Using the STATA editor 2) Reading STATA (*.dta) files 3) Reading non-STATA format files (e.g. ASCII) - infile.

Slides:



Advertisements
Similar presentations
Survival Analysis. Key variable = time until some event time from treatment to death time for a fracture to heal time from surgery to relapse.
Advertisements

Day 7 Survival Analysis. CHD and coffee Is there an association between CHD and coffee consumption? Outcome: Time to onset of CHD.
Survival Analysis-1 In Survival Analysis the outcome of interest is time to an event In Survival Analysis the outcome of interest is time to an event The.
Survival Analysis III Reading VGSM
Introduction to Survival Analysis October 19, 2004 Brian F. Gage, MD, MSc with thanks to Bing Ho, MD, MPH Division of General Medical Sciences.
HSRP 734: Advanced Statistical Methods July 24, 2008.
SC968: Panel Data Methods for Sociologists
بسم الله الرحمن الرحیم. Generally,survival analysis is a collection of statistical procedures for data analysis for which the outcome variable of.
Stata 4, Survival Hein Stigum Presentation, data and programs at: Jun-151H.S.
Chapter 11 Survival Analysis Part 3. 2 Considering Interactions Adapted from "Anderson" leukemia data as presented in Survival Analysis: A Self-Learning.
Duration models Bill Evans 1. timet0t0 t2t2 t 0 initial period t 2 followup period a b c d e f h g i Flow sample.
Biostatistics in Research Practice Time to event data Martin Bland Professor of Health Statistics University of York
Event History Analysis 6
Event History Analysis 5 Sociology 8811 Lecture 19 Copyright © 2007 by Evan Schofer Do not copy or distribute without permission.
Main Points to be Covered Cumulative incidence using life table method Difference between cumulative incidence based on proportion of persons at risk and.
Event History Models 2 Sociology 229A: Event History Analysis Class 4 Copyright © 2008 by Evan Schofer Do not copy or distribute without permission.
Measures of disease frequency (I). MEASURES OF DISEASE FREQUENCY Absolute measures of disease frequency: –Incidence –Prevalence –Odds Measures of association:
Survival Analysis A Brief Introduction Survival Function, Hazard Function In many medical studies, the primary endpoint is time until an event.
Analysis of Complex Survey Data
Survival Analysis in SAS
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 10: Survival Curves Marshall University Genomics Core.
17. Duration Modeling. Modeling Duration Time until retirement Time until business failure Time until exercise of a warranty Length of an unemployment.
1 Survival Analysis with STATA Robert A. Yaffee, Ph.D. Academic Computing Services ITS p Office: 75 Third Avenue Level C-3.
Survival Analysis III Reading VGSM
1 predcumi: A postestimation command for predicting and visualising cumulative incidence estimates after Cox regression models. Stephen Kaptoge Department.
Biostat 209 Survival Data l John Kornak April 2, 2013 Reading VGSM 3.5 (review) and epibiostat.ucsf.edu/biostat/vgs.
Essentials of survival analysis How to practice evidence based oncology European School of Oncology July 2004 Antwerp, Belgium Dr. Iztok Hozo Professor.
1 Survival Analysis Biomedical Applications Halifax SAS User Group April 29/2011.
NASSER DAVARZANI DEPARTMENT OF KNOWLEDGE ENGINEERING MAASTRICHT UNIVERSITY, 6200 MAASTRICHT, THE NETHERLANDS 22 OCTOBER 2012 Introduction to Survival Analysis.
Survival Data John Kornak March 29, 2011
HSRP 734: Advanced Statistical Methods July 10, 2008.
Stata Workshop #1 Chiu-Hsieh (Paul) Hsu Associate Professor College of Public Health
Dr Laura Bonnett Department of Biostatistics. UNDERSTANDING SURVIVAL ANALYSIS.
1 Introduction to medical survival analysis John Pearson Biostatistics consultant University of Otago Canterbury 7 October 2008.
Sep 2005:LDA - ONS1 Event history data structures and data management Paul Lambert Stirling University Prepared for “Longitudinal Data Analysis for Social.
EHA: More On Plots and Interpreting Hazards Sociology 229A: Event History Analysis Class 9 Copyright © 2008 by Evan Schofer Do not copy or distribute without.
2 December 2004PubH8420: Parametric Regression Models Slide 1 Applications - SAS Parametric Regression in SAS –PROC LIFEREG –PROC GENMOD –PROC LOGISTIC.
INTRODUCTION TO SURVIVAL ANALYSIS
Applied Epidemiologic Analysis Fall 2002 Patricia Cohen, Ph.D. Henian Chen, M.D., Ph. D. Teaching Assistants Julie KranickSylvia Taylor Chelsea MorroniJudith.
Chapter 12 Survival Analysis.
HSRP 734: Advanced Statistical Methods July 17, 2008.
More EHA Models & Diagnostics Sociology 229A: Event History Analysis Class 7 Copyright © 2008 by Evan Schofer Do not copy or distribute without permission.
Applied Epidemiologic Analysis - P8400 Fall 2002 Lab 9 Survival Analysis Henian Chen, M.D., Ph.D.
Survival Analysis Bandit Thinkhamrop, PhD. (Statistics) Department of Biostatistics and Demography Faculty of Public Health, Khon Kaen University.
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Within Subjects Analysis of Variance PowerPoint.
EHA Diagnostics Sociology 229A: Event History Analysis Class 5 Copyright © 2008 by Evan Schofer Do not copy or distribute without permission.
Survival Analysis in Stata First, declare your survival-time variables to Stata using stset For example, suppose your duration variable is called timevar.
01/20151 EPI 5344: Survival Analysis in Epidemiology Actuarial and Kaplan-Meier methods February 24, 2015 Dr. N. Birkett, School of Epidemiology, Public.
Treat everyone with sincerity,
Biostatistics Case Studies 2007 Peter D. Christenson Biostatistician Session 2: Aging and Survival.
Some survival basics Developments from the Kaplan-Meier method October
01/20151 EPI 5344: Survival Analysis in Epidemiology Hazard March 3, 2015 Dr. N. Birkett, School of Epidemiology, Public Health & Preventive Medicine,
Topic 19: Survival Analysis T = Time until an event occurs. Events are, e.g., death, disease recurrence or relapse, infection, pregnancy.
02/20161 EPI 5344: Survival Analysis in Epidemiology Hazard March 8, 2016 Dr. N. Birkett, School of Epidemiology, Public Health & Preventive Medicine,
Data Workshop H397. Data Cleaning  Inputting data  Missing Values  Converting String Variables  Creating Scales  Creating Dummy Variables.
Additional Regression techniques Scott Harris October 2009.
SURVIVAL ANALYSIS PRESENTED BY: DR SANJAYA KUMAR SAHOO PGT,AIIH&PH,KOLKATA.
03/20161 EPI 5344: Survival Analysis in Epidemiology Estimating S(t) from Cox models March 29, 2016 Dr. N. Birkett, School of Epidemiology, Public Health.
[Topic 11-Duration Models] 1/ Duration Modeling.
03/20161 EPI 5344: Survival Analysis in Epidemiology Testing the Proportional Hazard Assumption April 5, 2016 Dr. N. Birkett, School of Epidemiology, Public.
Survival time treatment effects
April 18 Intro to survival analysis Le 11.1 – 11.2
Survival curves We know how to compute survival curves if everyone reaches the endpoint so there is no “censored” data. Survival at t = S(t) = number still.
Proportional Hazard Models
CHAPTER 18 SURVIVAL ANALYSIS Damodar Gujarati
Survival Analysis with STATA
Advanced quantitative methods for social scientists (2017–2018) LC & PVK Session 6 Event History Analysis / survival (and other tools for social and individual.
Jeffrey E. Korte, PhD BMTRY 747: Foundations of Epidemiology II
Descriptive Statistics
Introductory Statistics
Presentation transcript:

SURVIVAL ANALYSIS WITH STATA

DATA INPUT 1) Using the STATA editor 2) Reading STATA (*.dta) files 3) Reading non-STATA format files (e.g. ASCII) - infile varlist using “path_filename” - infile using “path_filename” (when the file includes the dictionary) - use “path_filename”, clear … If there are other data opened!

list values of the variables tabulate var 1 var 2 one-way two-way frequency table tab1 var 1 var 2 …. var n tab2 var 1 var 2 …. var n describe varlist Describe the variable features summarize varlist Descrive the variable features by simple summary statistics (mean, standard deviation, median, quartiles) DATA DESCRIPTION tab1 var 1 var 2 …. var n n one-way frequency tables n(n-1)/2 two-way frequency tables

Help! help(stata command) …

st Need to specify at least survival time (and a failure variable) before you can do any survival analysis: - stset … The st-setting will stay for all following analysis, until another stset is specified! SURVIVAL WITH STATA

stset timevar, failure(statusvar) idtimevarstatusvar failure event: statusvar != 0 & statusvar <. obs. time interval: (0, timevar] exit on or before: failure total obs. 0 exclusions obs. remaining, representing 2 failures in single record/single failure data 89 total analysis time at risk, at risk from t = 0 earliest observed entry t = 0 last observed exit t = 47 Default origin is 0…if want to change use option origin()

SURVIVAL WITH STATA stset timevar, failure(statusvar) idtimevarstatusvar idtimevarstatusvar_st_d_t_t

- right censoring - stset timevar, failure(statusvar) stset timevar, failure(statusvar) enter(etimevar) - left truncation (delayed entry) - FAILURE AND CENSORING (individual times) idvar timevar statusvar idvar etimevar timevar statusvar    

- time-varying covariate - stset timevar, failure(statusvar) id(idvar) stset timevar, failure(statusvar) exit(time.) id(idvar) - recurrent events - Multiple Observations idvar timevar statusvar x1 x idvar timevar statusvar X1=10 X1=15 80  100 X2= X2=3 X2=2 30  75   104 

stset timevar, failure(statusvar) enter(etimevar) id(idvar) - discontinuity of the observation - idvar etimevar timevar statusvar  Multiple Observations

MAIN COMMANDS FOR SURVIVAL ANALYSIS stset stdes stsum stsplit sts ltable strate stcompet stcox stphplot stcoxkm streg stcurve defines the survival data setting produces data description produces summary measures time is split into intervals of fixed length e.g. 18=[0,5)+[5, 10)+[10,15)+[15,18] plot and list Km and NA estimates of S e  plot and list estimates of S e  for grouped times estimates failure rates estimates the crude incidence of competing risks fits Cox model performs a graphical check of PH assumption contrasts model predicted curves and KM curves fits parametric models plot and list estimated S e 

sts sts list, [na] Produces the Kaplan-Meier (KM) estimate of S and Nelson-Aalen (NA) estimate of  sts test Performs a nonparametric tests for the comparison of survival curves sts graph, [na] Plot the estimates sts generate Enable to store results for future elaborations

sts list [if exp] [in range] [, by(varlist) na failure at(#|numlist) compare enter level(#)] compare at na failure enter List the estimates at given times NA estimate of the cumulative hazard Estimate of the cumulative incidence (1-S) contrast the estimates according to groups defined in the by statement show the subjects entering and exiting the risk set, useful for delayed entry e.g. at( ), at(5 10 to 100) sts list

lost gwood na cna sts graph [if exp] [in range] [, by(varlist) failure gwood na cna hazard enter atrisk lost censored(single|number|multiple) censored at risk failure hazard enter plots   (na) and confidence bounds (cna) plots (1-S) plots the hazard provide confidence bounds for S or 1-S shows number of censored subjects marks the censored times shows number of at risk shows the number of subjects entering the risk set sts graph

sts test varlist [if exp] [in range], {logrank | wilcoxon | tware | peto | fh(p q) } strata(varlist) detail TESTWEIGHTOPTION Log-rank1default Wilcoxon-Gehannini w Tarone-Waretw Peto-PetoP Fleming-Harringtonfh(p q) sts test

Year Interval Alive Dead Lost Censored timevar statusvar freqvar FAILURE AND CENSORING (grouped times) Life Table

ltable timevar statusvar [if exp] [in range], [by(varlist) level(#) sur failure hazard intervals(w|numlist) graph noconf] - Individual times ltable timevar statusvar [freq=freqvar] ….. - Grouped times ltable strate strate [varlist] [if exp] [in range] [, per(#) level(#) graph nowhisker] Enable to calculate the hazard rate per(#) Define the measurement unit of time, e.g. if time is measured in months per(12) enable to interpret results in terms of person years. - Individual times

stphplot stphplot [if exp], { by(varname) strata(varname) } [adjust(varlist) nolntime nonegative zero graph_options] adjust for other covariates Plot of -ln(-ln(survival)) against ln(time), according to a discrete variable adjust(varlist) against timenolntime plot of ln(-ln(survival)) nonegative by(varname) variable to check Performs a graphical check of the PH assumption

stcox [varlist] [if exp] [in range] [, nohr strata(varnames) robust mgale(newvar) esr(newvars) schoenfeld(newvars) scaledsch(newvars) basehc(newvar) basechazard(newvar) basesurv(newvar) [breslow | efron | exactm | exactp] estimate noshow offset(varname) level(#) maximize_options] strata varlistregressors stcox Fit Cox Regression Models fit stratified Cox model stcoxkm stcoxkm [if exp], by(varname) [separate ties(breslow | efron | exactp | exactm) graph options ] Graphical comparison of model predicted and observed (KM) curves, according to a discrete covariate

streg [varlist] [if exp] [in range] ……, dist(distribution) e =Exponential streg Fit Parametric Regression Models stcurve, surv haz cum at (varname=value) … w = Weibull ll = Log-logistic Plot estimated curves at given level of covariates