Overview
sta310r contains the 33 data sets that accompany Collett
(2023), Modelling Survival Data in Medical Research (4th
edition), documented for the STA310 course at the University of
Gothenburg. Each data set has a help page with the background of the
study, the coded variables and references to the relevant chapter and
examples in Collett (2023).
The data sets
All data sets are available by name once the package is loaded:
data(package = "sta310r")$results[, "Item"]
#> [1] "aortic" "bladder" "bmt"
#> [4] "bmt_leukaemia" "bmt_outcome" "breast"
#> [7] "breast_rfs" "cgd" "cirrhosis"
#> [10] "cirrhosis_cp" "cirrhosis_lbr" "d1.1"
#> [13] "d1.2" "d1.3" "d1.4"
#> [16] "d10.1" "d10.2" "d10.3"
#> [19] "d10.4" "d11.1" "d11.2"
#> [22] "d11.3" "d11.4" "d11.5"
#> [25] "d11.6" "d11.7" "d11.8"
#> [28] "d12.1" "d12.2" "d12.3"
#> [31] "d12.4" "d12.5" "d12.6"
#> [34] "d12.7" "d13.2" "d13.3"
#> [37] "d13.4" "d14.1" "d14.3"
#> [40] "d15.1" "d15.2" "d15.3"
#> [43] "d16.1" "d16.2" "d16.3"
#> [46] "d16.4" "d16.5" "d16.6"
#> [49] "d16.7" "d2.1" "d2.10"
#> [52] "d2.11" "d2.12" "d2.13"
#> [55] "d2.14" "d2.15" "d2.16"
#> [58] "d2.2" "d2.3" "d2.4"
#> [61] "d2.5" "d2.6" "d2.7"
#> [64] "d2.8" "d2.9" "d3.1"
#> [67] "d3.10" "d3.11" "d3.12"
#> [70] "d3.13" "d3.14" "d3.15"
#> [73] "d3.16" "d3.17" "d3.19"
#> [76] "d3.2" "d3.20" "d3.3"
#> [79] "d3.4" "d3.5" "d3.6"
#> [82] "d3.7" "d3.8" "d3.9"
#> [85] "d4.1" "d4.10" "d4.11"
#> [88] "d4.12" "d4.2" "d4.3"
#> [91] "d4.4" "d4.5" "d4.6"
#> [94] "d4.7" "d4.8" "d4.9"
#> [97] "d5.1" "d5.10" "d5.11"
#> [100] "d5.12" "d5.13" "d5.14"
#> [103] "d5.15" "d5.16" "d5.17"
#> [106] "d5.2" "d5.3" "d5.4"
#> [109] "d5.5" "d5.6" "d5.7"
#> [112] "d5.8" "d5.9" "d6.1"
#> [115] "d6.4" "d6.5" "d6.6"
#> [118] "d7.1" "d7.2" "d7.3"
#> [121] "d7.4" "d8.2" "d8.3"
#> [124] "d8.4" "d8.5" "d8.6"
#> [127] "d8.7" "d8.8" "d8.9"
#> [130] "d9.1" "d9.4" "d9.5"
#> [133] "d9.6" "d9.7" "dataset_by_exercise"
#> [136] "dialysis" "ducks" "gastric"
#> [139] "help" "hepatitis" "hyper"
#> [142] "iud" "kidney" "kidney_centres"
#> [145] "liver" "liver_wait" "lung_transplant"
#> [148] "melanoma" "mice" "myeloma"
#> [151] "numerical_illustration" "ovarian" "prostate"
#> [154] "pulmonary" "rats" "scottish_mbc_cohort"
#> [157] "tamoxifen" "ulcer"The data sets used most often in the lectures are iud,
breast, myeloma, ovarian,
liver and rats. As an example,
iud holds the time to discontinuation of the use of an IUD
for 18 women:
iud
#> time status
#> 1 10 1
#> 2 13 0
#> 3 18 0
#> 4 19 1
#> 5 23 0
#> 6 30 1
#> 7 36 1
#> 8 38 0
#> 9 54 0
#> 10 56 0
#> 11 59 1
#> 12 75 1
#> 13 93 1
#> 14 97 1
#> 15 104 0
#> 16 107 1
#> 17 107 0
#> 18 107 0The package also includes [scottish_mbc_cohort], a synthetic cohort used in the computer exercises.
Data sets by example
Every data set that is used in a worked example of Collett (2023) has
an alias dX.Y, where X.Y is the number of the
example. See vignette("datasets-by-exercise") for the full
index.
Computer exercises
The course exercises are vignettes in the package:
-
vignette("cs1-survival-data")— the questions for Computer exercise 1 (Chapters 1–2). -
vignette("cs1-solutions")— the same document with the solutions included after each question.
The exercises use the data sets in this package together with the
survival package. They do not rely on any estimator
functions from sta310r; the analysis code is written with
the standard survival workflow.