stat 7780: survival analysiswebhome.auburn.edu/~carpedm/courses/stat7040/survival/review-1.pdfin sas...
TRANSCRIPT
STAT 7780: Survival AnalysisFirst Review
Peng Zeng
Department of Mathematics and StatisticsAuburn University
Fall 2017
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 1 / 25
Outline
1 Review
2 SAS codes
3 Proc LifeTest
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 2 / 25
Review
Quantities
survival function
hazard function
cumulative hazard function
mean residual life
median lifetime
Relationship between these quantities.
express one quantity in terms of the other
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 3 / 25
Review
Common Parametric Models
Exponential distribution
Weibull distribution
Gamma distribution
Need to know
density function
mean and variance
basic properties
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 4 / 25
Review
Censoring and Truncation
Be able to distinguish the following scenarios
type I censoring & type II censoring
left/right/double/interval censoring
progressive/generalized censoring
left/right truncation
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 5 / 25
Review
Likelihood Function
write out likelihood function for different censoring/truncationscenarios
maximum likelihood estimator (MLE)
asymptotic distribution of MLE
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 6 / 25
Review
Left-Truncated and Right-Censored Data
Most discussions are presented in terms of right-censored data.
Understand how the formula are adjusted for left-truncated data.
Understand
ti distinct event times
di number of events
Yi number of individuals at risk
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 7 / 25
Review
Kaplan-Meier Estimator
Need to understand
product-limit estimator
variance
pointwise confidence interval
confidence band
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 8 / 25
Review
Nelson-Aalen Estimator
Need to understand
estimator
variance
pointwise confidence interval
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 9 / 25
Review
Mean Survival Time
Need to understand
estimator
variance
confidence interval
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 10 / 25
Review
Median Survival Time
Need to understand
estimator
variance
confidence interval
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 11 / 25
Review
Hypothesis Testing
one-sample log-rank test
log-rank test and Wilcoxon test
test for trend
Renyi type tests
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 12 / 25
Review
Parametric Regression
Three different views
accelerated fail-time model
log-time linear model
distribution of life time
Two distributions
Weibull distribution.
Log-logistic distribution.
Topics include
interpretation of parameters
hypothesis testing (Wald’s test, likelihood ratio test)
AIC
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 13 / 25
SAS codes
SAS Code
ods graphics on;proc lifetest data = your-SAS-data more-options;
time T * delta(level-for-censoring);run;
with ods graphics on;, SAS draws a graph for the estimated S(t)
use statement strata to compare groups
use statement ods output ProductLimitEstimates =mySASfile;to output the results of Kaplan-Meier estimators andNelson-Aalen estimator.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 14 / 25
SAS codes
More SAS Options
nelson requests Nelson-Aalen estimators
plots = S(CL CB = EP) plots pointwise confidence intervalband confidence band for S(t)
outsurv = creates a data set for estimated S(t) and more
conftype = linear type of confidence interval, default is loglog.
confband = ep type of confidence band,
stderr outputs standard error of S(t) with outsurv =
alpha = specifies confidence level
adjust = in strata statement for multiple comparison.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 15 / 25
SAS codes
SAS for Parametric Regression
proc lifereg data = SAS-data-set;model time * delta(0) = list-of-variables;output out = new-data keyword = names;
run;
In SAS output, Weibull shape means 1/σ and Weibull scalemeans eµ.
Use option covb for the estimated covariance matrix.
Use option distribution = to specify distribution. It can beexponential, gamma, llogistic, lnormal, weibull.
The keyword in output statement can be cres, sres, xbeta.
probplot statement provides a plot for checking distribution ofresponse.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 16 / 25
SAS codes
SAS Code
proc lifereg data = SAS-data-set;model (lower, upper) = list-of-variables;
run;
The censoring status is determined by whether the two values areequal and whether either is coded as missing data:
Uncensored LOWER and UPPER are both present and equal.Interval Censored LOWER and UPPER are present and different.Right Censored LOWER is present, but UPPER is missing.Left Censored LOWER is missing, but UPPER is present.
Observations are also excluded if times are 0 or negative or bothUPPER and LOWER are missing or if LOWER > UPPER.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 17 / 25
Proc LifeTest
LifeTest Procedure
LIFETEST procedure can be used to
Estimate survival curves
Compare different populations
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 18 / 25
Proc LifeTest
Syntax
PROC LIFETEST options;BY variables;FREQ variable;ID variables;STRATA variables;TEST variables;TIME variable;WEIGHT variables;
Some comments.
proc lifetest and time statements are required and the remainingstatements are optional.
Most statements have many options.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 19 / 25
Proc LifeTest
Commonly-used Statements
The TIME statement specifies the variables that define thesurvival time and censoring indicator.
The STRATA statement specifies a variable or set of variablesthat define the strata for the analysis.
The TEST statement specifies a list of numeric covariates to betested for their association with the response survival time. Eachvariable is tested individually, and a joint test statistic is alsocomputed.
The ID statement provides a list of variables whose valuesidentify observations in the product-limit, Breslow, orFleming-Harrington estimates.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 20 / 25
Proc LifeTest
OptionsOptions in proc lifetest statements.
nelson or aalen produces the Nelson-Aalen estimates of thecumulative hazards and the corresponding standard errors.
outsurv = names an output data set to contain survivor functionestimates
outtest = names an output data set to contain rank teststatistics for association of survival time with covariatesplots = specifies plots to display. Supported plots include
hazard or H for the estimated hazard functions.loglogS or LLS for the log of negative log of estimated survivorfunctions versus the log of time.logSurv or LS for the negative log of estimated survivorfunctions versus time.survival or S for the estimated survivor functions.
maxtime = specifies the maximum time value for plotting.Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 21 / 25
Proc LifeTest
Example: Lung Cancer
The following variables are available for a corhort of lung cancerpatients.
SurvTime: survival time in days, where negative values indicatecensoring.
Cell: type of cancer cell (squamous, small, adeno, large)
Therapy: type of therapy: 0 = standard or 1 = test
Prior: prior therapy: 0 = no, 10 = yes
Age: age in years
DiagTime: time in months from diagnosis to entry into the trial
Kps: performance status
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 22 / 25
Proc LifeTest
Example: Bone Marrow Transplant
Data of 137 bone marrow transplant patients have been saved in thedata set BMT in the sashelp library.
T: represents the disease-free survival time (time to death orrelapse or to the end of the study in days)
Status: the censoring indicator 1 = event time and 0 = censoredtime.
Group: the patient’s risk category (ALL, AML-low, AML-high)
This example highlights a number of features in the survival plot thatuses ODS Graphics. Also shown in this example are comparisons ofsurvival curves based on multiple comparison adjustments.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 23 / 25
Proc LifeTest
Commentsatrisk = suboption of survival curves (plots = S) specifies thetime points at which the at-risk numbers are displayed.
The strata = panel of survival curves (plots = S) specificationrequests that the survival curves be displayed in a panel of threeplots, one for each risk group.
In the strata statement, the adjust = sidak option requests theSidak multiple-comparison adjustment, and by default, all pairedcomparisons are carried out.
Use diff = option in the strata statement to designate one groupas the control and apply a multiple-comparison adjustment tothe p-values for the paired comparison between the controlgroup with each of treatment groups.
The order = internal option in the strata statement enables oneto order the strata by their internal values.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 24 / 25
Proc LifeTest
Example: Life-Table Estimate
The data in this example represent the survival rates of males withangina pectoris.
Survival time is measured as years from the time of diagnosis.
Data are the number of events and number of withdrawals ineach one-year time interval.
Use method = lt for life-table method of computing estimates.
Peng Zeng (Auburn University) STAT 7780 – Lecture Notes Fall 2017 25 / 25