__Applied Survival Analysis Using R__ covers the main principles of survival analysis, gives examples of how it is applied, and teaches how to put those principles to use to analyze data using R as a vehicle. Survival data, where the primary outcome is time to a specific event, arise in many areas of biomedical research, including clinical trials, epidemiological studies, and studies of animals. Many survival methods are extensions of techniques used in linear regression and categorical data, while other aspects of this field are unique to survival data. This text employs numerous actual examples to illustrate survival curve estimation, comparison of survivals of different groups, proper accounting for censoring and truncation, model variable selection, and residual analysis.Because explaining survival analysis requires more advanced mathematics than many other statistical topics, this book is organized with basic concepts and most frequently used procedures covered in earlier chapters, with more advanced topics near the end and in the appendices. A background in basic linear regression and categorical data analysis, as well as a basic knowledge of calculus and the R system, will help the reader to fully appreciate the information presented. Examples are simple and straightforward while still illustrating key points, shedding light on the application of survival analysis in a way that is useful for graduate students, researchers, and practitioners in biostatistics. Preface 8 Contents 12 1 Introduction 16 1.1 What Is Survival Analysis? 16 1.2 What You Need to Know to Use This Book 17 1.3 Survival Data and Censoring 17 1.4 Some Examples of Survival Data Sets 21 1.5 Additional Notes 24 Exercises 25 2 Basic Principles of Survival Analysis 26 2.1 The Hazard and Survival Functions 26 2.2 Other Representations of a Survival Distribution 28 2.3 Mean and Median Survival Time 29 2.4 Parametric Survival Distributions 30 2.5 Computing the Survival Function from the Hazard Function 34 2.6 A Brief Introduction to Maximum Likelihood Estimation 35 2.7 Additional Notes 38 Exercises 39 3 Nonparametric Survival Curve Estimation 40 3.1 Nonparametric Estimation of the Survival Function 40 3.2 Finding the Median Survival and a Confidence Interval for the Median 45 3.3 Median Follow-Up Time 47 3.4 Obtaining a Smoothed Hazard and Survival Function Estimate 47 3.5 Left Truncation 51 3.6 Additional Notes 56 Exercises 57 4 Nonparametric Comparison of Survival Distributions 58 4.1 Comparing Two Groups of Survival Times 58 4.2 Stratified Tests 64 4.3 Additional Note 67 Exercises 68 5 Regression Analysis Using the Proportional Hazards Model 69 5.1 Covariates and Nonparametric Survival Models 69 5.2 Comparing Two Survival Distributions Using a Partial Likelihood Function 70 5.3 Partial Likelihood Hypothesis Tests 73 5.3.1 The Wald Test 74 5.3.2 The Score Test 74 5.3.3 The Likelihood Ratio Test 74 5.4 The Partial Likelihood with Multiple Covariates 77 5.5 Estimating the Baseline Survival Function 78 5.6 Handling of Tied Survival Times 79 5.7 Left Truncation 83 5.8 Additional Notes 85 Exercises 85 6 Model Selection and Interpretation 87 6.1 Covariate Adjustment 87 6.2 Categorical and Continuous Covariates 88 6.3 Hypothesis Testing for Nested Models 92 6.4 The Akaike Information Criterion for Comparing Non-nested Models 95 6.5 Including Smooth Estimates of Continuous Covariates in a Survival Model 98 6.6 Additional Note 100 Exercises 100 7 Model Diagnostics 101 7.1 Assessing Goodness of Fit Using Residuals 101 7.1.1 Martingale and Deviance Residuals 101 7.1.2 Case Deletion Residuals 106 7.2 Checking the Proportion Hazards Assumption 108 7.2.1 Log Cumulative Hazard Plots 108 7.2.2 Schoenfeld Residuals 110 7.3 Additional Note 114 Exercises 114 8 Time Dependent Covariates 115 8.1 Introduction 115 8.2 Predictable Time Dependent Variables 120 8.2.1 Using the Time Transfer Function 121 8.2.2 Time Dependent Variables That Increase Linearly with Time 123 8.3 Additional Note 124 Exercises 124 9 Multiple Survival Outcomes and Competing Risks 126 9.1 Clustered Survival Times and Frailty Models 126 9.1.1 Marginal Survival Models 128 9.1.2 Frailty Survival Models 129 9.1.3 Accounting for Family-Based Clusters in the ``ashkenazi'' Data 130 9.1.4 Accounting for Within-Person Pairing of Eye Observations in the Diabetes Data 133 9.2 Cause-Specific Hazards 134 9.2.1 Kaplan-Meier Estimation with Competing Risks 134 9.2.2 Cause-Specific Hazards and Cumulative Incidence Functions 136 9.2.3 Cumulative Incidence Functions for ProstateCancer Data 139 9.2.4 Regression Methods for Cause-Specific Hazards 141 9.2.5 Comparing the Effects of Covariates on Different Causes of Death 144 9.3 Additional Notes 147 Exercises 147 10 Parametric Models 149 10.1 Introduction 149 10.2 The Exponential Distribution 149 10.3 The Weibull Model 150 10.3.1 Assessing the Weibull Distribution as a Model for Survival Data in a Single Sample 150 10.3.2 Maximum Likelihood Estimation of Weibull Parameters for a Single Group of Survival Data 153 10.3.3 Profile Weibull Likelihood 154 10.3.4 Selecting a Weibull Distribution to Model Survival Data 155 10.3.5 Comparing Two Weibull Distributions Using the Accelerated Failure Time and Proportional Hazards Models 158 10.3.6 A Regression Approach to the Weibull Model 160 10.3.7 Using the Weibull Distribution to Model Survival Data with Multiple Covariates 161 10.3.8 Model Selection and Residual Analysis with Weibull Survival Data 163 10.4 Other Parametric Survival Distributions 165 10.5 Additional Note 166 Exercises 166 11 Sample Size Determination for Survival Studies 168 11.1 Power and Sample Size for a Single Arm Study 168 11.2 Determining the Probability of Death in a Clinical Trial 172 11.3 Sample Size for Comparing Two Exponential Survival Distributions 174 11.4 Sample Size for Comparing Two Survival Distributions Using the Log-Rank Test 176 11.5 Determining the Probability of Death from a Non-parametric Survival Curve Estimate 177 11.6 Example: Calculating the Required Number of Patients for a Randomized Study of Advanced Gastric Cancer Patients 180 11.7 Example: Calculating the Required Number of Patients for a Randomized Study of Patients with Metastatic Colorectal Cancer 181 11.8 Using Simulations to Estimate Power 182 11.9 Additional Notes 185 Exercises 186 12 Additional Topics 187 12.1 Using Piecewise Constant Hazards to Model Survival Data 187 12.2 Interval Censoring 197 12.3 The Lasso Method for Selecting Predictive Biomarkers 202 Exercises 208 A A Basic Guide to Using R for Survival Analysis 210 A.1 The R System 210 A.1.1 A First R Session 211 A.1.2 Scatterplots and Fitting Linear Regression Models 213 A.1.3 Accommodating Non-linear Relationships 216 A.1.4 Data Frames and the Search Path for Variable Names 218 A.1.5 Defining Variables Within a Data Frame 220 A.1.6 Importing and Exporting Data Frames 220 A.2 Working with Dates in R 221 A.2.1 Dates and Leap Years 222 A.2.2 Using the ``as.date'' Function 222 A.3 Presenting Coefficient Estimates Using Forest Plots 224 A.4 Extracting the Log Partial Likelihood and Coefficient Estimates from a coxph Object 226 References 227 Index 231 R Package Index 233 Applied Survival Analysis Using R covers the main principles of survival analysis, gives examples of how it is applied, and teaches how to put those principles to use to analyze data using R as a vehicle. Survival data, where the primary outcome is time to a specific event, arise in many areas of biomedical research, including clinical trials, epidemiological studies, and studies of animals. Many survival methods are extensions of techniques used in linear regression and categorical data, while other aspects of this field are unique to survival data. This text employs numerous actual examples to illustrate survival curve estimation, comparison of survivals of different groups, proper accounting for censoring and truncation, model variable selection, and residual analysis. Because explaining survival analysis requires more advanced mathematics than many other statistical topics, this book is organized with basic concepts and most frequently used procedures covered in earlier chapters, with more advanced topics near the end and in the appendices. A background in basic linear regression and categorical data analysis, as well as a basic knowledge of calculus and the R system, will help the reader to fully appreciate the information presented. Examples are simple and straightforward while still illustrating key points, shedding light on the application of survival analysis in a way that is useful for graduate students, researchers, and practitioners in biostatistics. Clearly illustrates concepts of survival analysis principles and analyzes actual survival data using R, in addition to including an appendix with a basic introduction to R Organized via basic concepts and most frequently used procedures, with advanced topics toward the end of the book and in appendices Includes multiple original data sets that have not appeared in other textbooks Dirk F. Moore is Associate Professor of Biostatistics at the Rutgers School of Public Health and the Rutgers Cancer Institute of New Jersey. He received a Ph. D. in biostatistics from the University of Washington in Seattle and, prior to joining Rutgers, was a faculty member in the Statistics Department at Temple University. He has published numerous papers on the theory and application of survival analysis and other biostatistics methods to clinical trials and epidemiology studies Front Matter....Pages i-xiv Introduction....Pages 1-10 Basic Principles of Survival Analysis....Pages 11-24 Nonparametric Survival Curve Estimation....Pages 25-42 Nonparametric Comparison of Survival Distributions....Pages 43-53 Regression Analysis Using the Proportional Hazards Model....Pages 55-72 Model Selection and Interpretation....Pages 73-86 Model Diagnostics....Pages 87-100 Time Dependent Covariates....Pages 101-111 Multiple Survival Outcomes and Competing Risks....Pages 113-135 Parametric Models....Pages 137-155 Sample Size Determination for Survival Studies....Pages 157-175 Additional Topics....Pages 177-199 Back Matter....Pages 201-226