STATASURVIVALANALYSISAND

2y ago
22 Views
2 Downloads
3.37 MB
560 Pages
Last View : 2m ago
Last Download : 2m ago
Upload by : Camille Dion
Transcription

STATA SURVIVAL ANALYSIS ANDEPIDEMIOLOGICAL TABLESREFERENCE MANUALRELEASE 13 A Stata Press PublicationStataCorp LPCollege Station, Texas

Copyright c 1985–2013 StataCorp LPAll rights reservedVersion 13Published by Stata Press, 4905 Lakeway Drive, College Station, Texas 77845Typeset in TEXISBN-10: 1-59718-126-9ISBN-13: 978-1-59718-126-6This manual is protected by copyright. All rights are reserved. No part of this manual may be reproduced, storedin a retrieval system, or transcribed, in any form or by any means—electronic, mechanical, photocopy, recording, orotherwise—without the prior written permission of StataCorp LP unless permitted subject to the terms and conditionsof a license granted to you by StataCorp LP to use the software and documentation. No license, express or implied,by estoppel or otherwise, to any intellectual property rights is granted by this document.StataCorp provides this manual “as is” without warranty of any kind, either expressed or implied, including, butnot limited to, the implied warranties of merchantability and fitness for a particular purpose. StataCorp may makeimprovements and/or changes in the product(s) and the program(s) described in this manual at any time and withoutnotice.The software described in this manual is furnished under a license agreement or nondisclosure agreement. The softwaremay be copied only in accordance with the terms of the agreement. It is against the law to copy the software ontoDVD, CD, disk, diskette, tape, or any other medium for any purpose other than backup or archival purposes.The automobile dataset appearing on the accompanying media is Copyright c 1979 by Consumers Union of U.S.,Inc., Yonkers, NY 10703-1057 and is reproduced by permission from CONSUMER REPORTS, April 1979.Stata,, Stata Press, Mata,, and NetCourse are registered trademarks of StataCorp LP.Stata and Stata Press are registered trademarks with the World Intellectual Property Organization of the United Nations.NetCourseNow is a trademark of StataCorp LP.Other brand and product names are registered trademarks or trademarks of their respective companies.For copyright information about the software, type help copyright within Stata.The suggested citation for this software isStataCorp. 2013. Stata: Release 13 . Statistical Software. College Station, TX: StataCorp LP.

Contentsintro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction to survival analysis manual1survival analysis . . . . Introduction to survival analysis & epidemiological tables commands2ct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Count-time data9ctset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declare data to be count-time data10cttost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert count-time data to survival-time data16discrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discrete-time survival analysis19epitab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tables for epidemiologists21ltable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Life tables for survival data77snapspan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert snapshot data to time-span data90st . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Survival-time data93st is . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Survival analysis subroutines for programmers95stbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Form baseline dataset 101stci . . . . . . . . . . . . . . . . . . . . Confidence intervals for means and percentiles of survival time 111stcox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cox proportional hazards model 120stcox PH-assumption tests . . . . . . . . . . . . . . . . . . . Tests of proportional-hazards assumption 152stcox postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for stcox 167stcrreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Competing-risks regression 200stcrreg postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for stcrreg 226stcurve . . . . . . . . Plot survivor, hazard, cumulative hazard, or cumulative incidence function 236stdescribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Describe survival-time data 247stfill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fill in by carrying forward values of covariates 251stgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generate variables reflecting entire histories 254stir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report incidence-rate comparison 260stpower . . . . . . . . . . . . . . . . . . . . . . . Sample size, power, and effect size for survival analysis 263stpower cox . . Sample size, power, and effect size for the Cox proportional hazards model 275stpower exponential . . . . . . . . . . . . . . . . . . . . Sample size and power for the exponential test 291stpower logrank . . . . . . . . . . . . . . . . Sample size, power, and effect size for the log-rank test 320stptime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Calculate person-time, incidence rates, and SMR 340strate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tabulate failure rates and rate ratios 347i

iiContentsstreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parametric survival models 358streg postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for streg 391sts . . . . . . . . . . . Generate, graph, list, and test the survivor and cumulative hazard functions 401sts generate . . . . . . . . . . . . . . . . . . Create variables containing survivor and related functions 417sts graph . . . . . . . . . . . . . . . . . . . Graph the survivor, hazard, or cumulative hazard function 420sts list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List the survivor or cumulative hazard function 439sts test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Test equality of survivor functions 444stset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declare data to be survival-time data 459stsplit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Split and join time-span records 501stsum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summarize survival-time data 519sttocc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert survival-time data to case–control data 525sttoct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert survival-time data to count-time data 530stvary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report variables that vary over time 532Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535Subject and author index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .545

Cross-referencing the documentationWhen reading this manual, you will find references to other Stata manuals. For example,[U] 26 Overview of Stata estimation commands[R] regress[D] reshapeThe first example is a reference to chapter 26, Overview of Stata estimation commands, in the User’sGuide; the second is a reference to the regress entry in the Base Reference Manual; and the thirdis a reference to the reshape entry in the Data Management Reference Manual.All the manuals in the Stata Documentation have a shorthand notation:[GSM][GSU][GSW][U ][R][D ][G ][XT][ME][MI][MV][PSS][P ][SEM][SVY][ST][TS][TE][I]Getting Started with Stata for MacGetting Started with Stata for UnixGetting Started with Stata for WindowsStata User’s GuideStata Base Reference ManualStata Data Management Reference ManualStata Graphics Reference ManualStata Longitudinal-Data/Panel-Data Reference ManualStata Multilevel Mixed-Effects Reference ManualStata Multiple-Imputation Reference ManualStata Multivariate Statistics Reference ManualStata Power and Sample-Size Reference ManualStata Programming Reference ManualStata Structural Equation Modeling Reference ManualStata Survey Data Reference ManualStata Survival Analysis and Epidemiological Tables Reference ManualStata Time-Series Reference ManualStata Treatment-Effects Reference Manual:Potential Outcomes/Counterfactual OutcomesStata Glossary and Index[M ]Mata Reference Manualiii

Titleintro — Introduction to survival analysis manualDescriptionRemarks and examplesAlso seeDescriptionThis entry describes this manual and what has changed since Stata 12. See the next entry,[ST] survival analysis, for an introduction to Stata’s survival analysis capabilities.Remarks and examplesThis manual documents commands for survival analysis and epidemiological tables and is referredto as [ST] in cross-references. Following this entry, [ST] survival analysis provides an overview ofthe commands.This manual is arranged alphabetically. If you are new to Stata’s survival analysis and epidemiological tables commands, we recommend that you read the following sections first:[ST] survival analysis[ST] st[ST] stsetIntroduction to survival analysis & epidemiological tables commandsSurvival-time dataSet variables for survival dataStata is continually being updated, and Stata users are always writing new commands. To find outabout the latest survival analysis features, type search survival after installing the latest officialupdates; see [R] update. To find out about the latest epidemiological features, type search epi.What’s newFor a complete list of all the new features in Stata 13, see [U] 1.3 What’s new.Also see[U] 1.3 What’s new[R] intro — Introduction to base reference manual1

Titlesurvival analysis — Introduction to survival analysis & epidemiological tables commandsDescriptionRemarks and examplesReferenceAlso seeDescriptionStata’s survival analysis routines are used to compute sample size, power, and effect size and todeclare, convert, manipulate, summarize, and analyze survival data. Survival data are time-to-eventdata, and survival analysis is full of jargon: truncation, censoring, hazard rates, etc. See the glossaryin this manual. For a good Stata-specific introduction to survival analysis, see Cleves et al. (2010).Stata also has several commands for analyzing contingency tables resulting from various forms ofobservational studies, such as cohort or matched case–control studies.This manual documents the following commands, which are described in detail in their respectivemanual entries.Declaring and converting count datactset[ST] ctsetDeclare data to be count-time datacttost[ST] cttostConvert count-time data to survival-time dataConverting snapshot datasnapspan[ST] snapspanConvert snapshot data to time-span dataDeclaring and summarizing survival-time datastset[ST] stsetDeclare data to be survival-time datastdescribe [ST] stdescribe Describe survival-time datastsum[ST] stsumSummarize survival-time dataManipulating survival-time datastvary[ST] stvarystfill[ST] stfillstgen[ST] stgenstsplit[ST] stsplitstjoin[ST] stsplitstbase[ST] stbaseReport variables that vary over timeFill in by carrying forward values of covariatesGenerate variables reflecting entire historiesSplit time-span recordsJoin time-span recordsForm baseline datasetObtaining summary statistics, confidence intervals, tables, etc.sts[ST] stsGenerate, graph, list, and test the survivor and cumulativehazard functionsstir[ST] stirReport incidence-rate comparisonstci[ST] stciConfidence intervals for means and percentiles of survival timestrate[ST] strateTabulate failure ratestptime[ST] stptimeCalculate person-time, incidence rates, and SMRstmh[ST] strateCalculate rate ratios with the Mantel–Haenszel methodstmc[ST] strateCalculate rate ratios with the Mantel–Cox methodltable[ST] ltableDisplay and graph life tables2

survival analysis — Introduction to survival analysis & epidemiological tables commandsFitting regression modelsstcoxestat concordanceestat phteststphplotstcoxkmstregstcurvestcrreg3[ST] stcoxCox proportional hazards model[ST] stcox postestimationCompute the concordance probability[ST] stcox PH-assumption tests Test Cox proportional-hazardsassumption[ST] stcox PH-assumption tests Graphically assess the Coxproportional-hazards assumption[ST] stcox PH-assumption tests Graphically assess the Coxproportional-hazards assumption[ST] stregParametric survival models[ST] stcurvePlot survivor, hazard, cumulativehazard, or cumulative incidencefunction[ST] stcrregCompeting-risks regressionSample-size and power determination for survival analysisstpower[ST] stpowerSample size, power, and effect sizefor survival analysisstpower cox[ST] stpower coxSample size, power, and effect size forthe Cox proportional hazards modelstpower exponential [ST] stpower exponentialSample size and power for theexponential teststpower logrank[ST] stpower logrankSample size, power, and effect size forthe log-rank testConverting survival-time datasttocc[ST] sttoccsttoct[ST] sttoctConvert survival-time data tocase–control dataConvert survival-time data tocount-time dataProgrammer’s utilitiesst *[ST] st isSurvival analysis subroutines forprogrammersEpidemiological tablesirirics[ST] epitab[ST] epitab[ST] epitabIncidence rates for cohort studiesImmediate form of irRisk differences, risk ratios, and oddsratios for cohort studiesImmediate form of cscsi[ST] abepitabepitabOdds ratios for case–control dataImmediate form of ccTests of log odds for case–control dataOdds ratios controlled for confoundingmccmcci[ST] epitab[ST] epitabAnalysis of matched case–control dataImmediate form of mcc

4survival analysis — Introduction to survival analysis & epidemiological tables commandsRemarks and examplesRemarks are presented under the following headings:IntroductionDeclaring and converting count dataConverting snapshot dataDeclaring and summarizing survival-time dataManipulating survival-time dataObtaining summary statistics, confidence intervals, tables, etc.Fitting regression modelsSample size and power determination for survival analysisConverting survival-time dataProgrammer’s utilitiesEpidemiological tablesIntroductionAll but one entry in this manual deals with the analysis of survival data, which is used to measurethe time to an event of interest such as death or failure. Survival data can be organized in twoways. The first way is as count data, which refers to observations on populations, whether people orgenerators, with observations recording the number of units at a given time that failed or were lostbecause of censoring. The second way is as survival-time, or time-span, data. In survival-time data,the observations represent periods and contain three variables that record the start time of the period,the end time, and an indicator of whether failure or right-censoring occurred at the end of the period.The representation of the response of these three variables makes survival data unique in terms ofimplementing the statistical methods in the software.Survival data may also be organized as snapshot data (a small variation of the survival-time format),in which observations depict an instance in time rather than an interval. When you have snapshotdata, you simply use the snapspan command to convert it to survival-time data before proceeding.Stata commands that begin with ct are used to convert count data to survival-time data. Survivaltime data are analyzed using Stata commands that begin with st, known in our terminology as stcommands. You can express all the information contained in count data in an equivalent survival-timedataset, but the converse is not true. Thus Stata commands are made to work with survival-time databecause it is the more general representation.The one remaining entry is [ST] epitab, which describes epidemiological tables. [ST] epitab coversmany commands dealing with analyzing contingency tables arising from various observational studies,such as case–control or cohort studies. [ST] epitab is included in this manual because the conceptspresented there are related to concepts of survival analysis, and both topics use the same terminologyand are of equal interest to many researchers.Declaring and converting count dataCount data must first be converted to survival-time data before Stata’s st commands can be used.Count data can be thought of as aggregated survival-time data. Rather than having observations thatare specific to a subject and a period, you have data that, at each recorded time, record the numberlost because of failure and, optionally, the number lost because of right-censoring.ctset is used to tell Stata the names of the variables in your count data that record the time, thenumber failed, and the number censored. You ctset your data before typing cttost to convert itto survival-time data. Because you ctset your data, you can type cttost without any arguments toperform the conversion. Stata remembers how the data are ctset.

survival analysis — Introduction to survival analysis & epidemiological tables commands5Converting snapshot dataSnapshot data are data in which each observation records the status of a given subject at a certainpoint in time. Usually you have multiple observations on each subject that chart the subject’s progressthrough the study.Before using Stata’s survival analysis commands with snapshot data, you must first convert the datato survival-time data; that is, the observations in the data should represent intervals. When you convertsnapshot data, the existing time variable in your data is used to record the end of a time span, and anew variable is created to record the beginning. Time spans are created using the recorded snapshottimes as breakpoints at which new intervals are to be created. Before converting snapshot data totime-span data, you must understand the distinction between enduring variables and instantaneousvariables. Enduring variables record characteristics of the subject that endure throughout the timespan, such as sex or smoking status. Instantaneous variables describe events that occur at the end of atime span, such as failure or censoring. When you convert snapshots to intervals, enduring variablesobtain their values from the previous recorded snapshot or are set to missing for the first interval.Instantaneous variables obtain their values from the current recorded snapshot because the existingtime variable now records the end of the span.Stata’s snapspan makes this whole process easy. You specify an ID variable identifying yoursubjects, the snapshot time variable, the name of the new variable to hold the beginning times of thespans, and any variables that you want to treat as instantaneous variables. Stata does the rest for you.Declaring and summarizing survival-time dataStata does not automatically recognize survival-time data, so you must declare your survival-timedata to Stata by using stset. Every st command relies on the information that is provided whenyou stset your data. Survival-time data come in different forms. For example, your time variablesmay be dates, time measured from a fixed date, or time measured from some other point un

survival analysis — Introduction to survival analysis & epidemiological tables commands DescriptionRemarks and examplesReferenceAlso see Description Stata’s survival analysis routines are used to compute sample size, power, and effect size and to declare, convert, manipulate, summarize, and analyze survival

Related Documents:

Introduction In this unit we shall try to know about Aristotle and his life and works and also understand about the relationship between Criticism and Creativity. We shall see how criticism is valued like creative writings. We shall know the role and place given to 'the critic' in the field of literary criticism.

ASME A17.1, 2013 NFPA 13, 2013 NFPA 72, 2013 Not a whole lot has changed in the sub-standards. Substantial requirements in the IBC/IFC. International Building Code (IBC) and International Fire Code (IFC) “General” Requirements. Hoistway Enclosures Built as “shafts” using fire barrier construction o 1 hr for 4 stories o 2 hr for 4 or more stories o Additional .

progress either to a BTEC Level 3, A/S levels or to employment within the sports and leisure industry. The course offers an alternative to GCSE Physical Education, catering for a wider range of individual needs. It is intended that the BTEC Level 1 / Level 2 First Award in Sport will use each student’s skills and enthusiasm in sport, to develop an awareness and interest in leisure, health .

akan menerbitkan Buku Acuan Sediaan Herbal (ASH). Namun saya tegaskan bahwa informasi yang terdapat dalam buku ini tidak dapat digunakan untuk mengklaim suatu produk, karena untuk mengklaim suatu produk harus didukung data penelitian lebih lanjut dari campuran simplisia yang terdapat dalam produk itu sendiri. Pada volume I, II, III dan IV masing-masing 30 monografi simplisia dari berbagai .

4 Mandatory Qualifications Apprentices without Level 2 English and Maths will need to achieve this prior to taking the end point assessment. For those with an education, health and care plan or a legacy statement the

AMENDMENT INSTRUCTION SHEET MINI WORKSHOP MANUAL Publication Number RCL 0193ENG - 2nd Edition Amendment Number: XN-001/97ENG Date: 12/96 To ensure that this manual is kept up to date and that a record of amendments to this manual is available, an

Peoples from World War II to the Early Cold War Brandon P. Seto, Loyola Marymount University Abstract: Long before the carnage of the Pacific Theater in the Second World War commenced, U.S. government officials, scholars, shapers of public opinion, and the general public questioned the nature of Asian peoples. At the war’s outset,

Utopian Communism of Cabet in France, and in Germany, of Weitling. Thus, Socialism was, in 1847, a middle-class movement, Communism a working-class movement. Socialism was, on the Continent at least, “respectable”; Communism was the very opposite. And as our notion, from the very beginning, was that “the