An index of the data sets in the package, one row for each combination of a
data set and a worked example in Collett (2023) that uses it. Each such
combination also defines an alias dX.Y, where X.Y is the number of the
example, and the alias is a copy of the data set. A data set that is used in
several examples therefore has several aliases.
Format
A data frame with one row per data set and example, with columns:
- dataset
Name of the data set in the package.
- dataset_title
Descriptive title of the data set, as on its help page.
- alias
Alias of the data set for this example,
dX.Y, orNAfor data sets that are not used in a numbered example.- example
Number of the example in Collett (2023), such as
"3.7", orNA.- chapter
Number of the chapter that contains the example, or
NA.- chapter_title
Title of that chapter, or
NA.- example_title
Title of the example as it appears in the book, or
NA.- n_rows
Number of rows in the data set.
- n_variables
Number of columns in the data set.
- note
A note for data sets that are not used in a numbered example, for example that they come from an appendix of the book or from the course material.
Source
The worked examples in Collett, D. (2023) Modelling Survival Data in Medical Research, 4th ed. Chapman & Hall/CRC.
Details
The index was compiled from the Example X.Y headings of the 4th edition.
The aliases are the data sets themselves, saved under the name dX.Y, so
d3.7 is the data used in Example 3.7 (the myeloma data) and d8.4 is
the baseline cirrhosis data. Use dataset_by_exercise to look up which
data set an example uses, and ?d3.7 to open the help page of that data
set.
Four data sets from the appendices of the book (bladder, ducks, bmt
and cgd) and the synthetic scottish_mbc_cohort are not used in a
numbered example. They have no alias and their example is NA; the
note column says where they come from. The cirrhosis study is the only
example with more than one data set in the package: cirrhosis is the
baseline form and has the alias d8.4, while cirrhosis_lbr and
cirrhosis_cp are the long and counting-process forms used in the same
example and have no alias of their own.
The table is generated by data-raw/dataset_by_exercise.R; re-run that
script after adding a data set or changing the example mapping.
See also
iud, breast, myeloma and the other data sets; the package
vignette vignette("datasets-by-exercise") presents the same index.
Examples
head(dataset_by_exercise)
#> dataset dataset_title alias
#> 1 iud Time to discontinuation of an intrauterine device (IUD) d1.1
#> 2 breast Prognosis for women with breast cancer d1.2
#> 3 myeloma Survival of multiple myeloma patients d1.3
#> 4 prostate Comparison of two treatments for prostatic cancer d1.4
#> 5 pulmonary Pulmonary metastasis in patients with osteosarcoma d2.1
#> 6 myeloma Survival of multiple myeloma patients d2.2
#> example chapter chapter_title
#> 1 1.1 1 Survival analysis
#> 2 1.2 1 Survival analysis
#> 3 1.3 1 Survival analysis
#> 4 1.4 1 Survival analysis
#> 5 2.1 2 Some non-parametric procedures
#> 6 2.2 2 Some non-parametric procedures
#> example_title n_rows n_variables note
#> 1 Time to discontinuation of the use of an IUD 18 2 <NA>
#> 2 Prognosis for women with breast cancer 45 3 <NA>
#> 3 Survival of multiple myeloma patients 48 10 <NA>
#> 4 Comparison of two treatments for prostatic cancer 38 8 <NA>
#> 5 Pulmonary metastasis 11 1 <NA>
#> 6 Survival of multiple myeloma patients 48 10 <NA>
subset(dataset_by_exercise, dataset == "myeloma")
#> dataset dataset_title alias example chapter
#> 3 myeloma Survival of multiple myeloma patients d1.3 1.3 1
#> 6 myeloma Survival of multiple myeloma patients d2.2 2.2 2
#> 10 myeloma Survival of multiple myeloma patients d2.6 2.6 2
#> 22 myeloma Survival of multiple myeloma patients d3.2 3.2 3
#> 25 myeloma Survival of multiple myeloma patients d3.5 3.5 3
#> 27 myeloma Survival of multiple myeloma patients d3.7 3.7 3
#> 28 myeloma Survival of multiple myeloma patients d3.8 3.8 3
#> 29 myeloma Survival of multiple myeloma patients d3.9 3.9 3
#> 35 myeloma Survival of multiple myeloma patients d3.15 3.15 3
#> 37 myeloma Survival of multiple myeloma patients d3.17 3.17 3
#> 38 myeloma Survival of multiple myeloma patients d3.19 3.19 3
#> 39 myeloma Survival of multiple myeloma patients d3.20 3.20 3
#> 44 myeloma Survival of multiple myeloma patients d4.5 4.5 4
#> 47 myeloma Survival of multiple myeloma patients d4.8 4.8 4
#> 48 myeloma Survival of multiple myeloma patients d4.9 4.9 4
#> 67 myeloma Survival of multiple myeloma patients d5.16 5.16 5
#> chapter_title
#> 3 Survival analysis
#> 6 Some non-parametric procedures
#> 10 Some non-parametric procedures
#> 22 The Cox regression model
#> 25 The Cox regression model
#> 27 The Cox regression model
#> 28 The Cox regression model
#> 29 The Cox regression model
#> 35 The Cox regression model
#> 37 The Cox regression model
#> 38 The Cox regression model
#> 39 The Cox regression model
#> 44 Model checking in the Cox regression model
#> 47 Model checking in the Cox regression model
#> 48 Model checking in the Cox regression model
#> 67 Parametric regression models
#> example_title n_rows n_variables note
#> 3 Survival of multiple myeloma patients 48 10 <NA>
#> 6 Survival of multiple myeloma patients 48 10 <NA>
#> 10 Survival of multiple myeloma patients 48 10 <NA>
#> 22 Survival of multiple myeloma patients 48 10 <NA>
#> 25 Survival of multiple myeloma patients 48 10 <NA>
#> 27 Survival of multiple myeloma patients 48 10 <NA>
#> 28 Survival of multiple myeloma patients 48 10 <NA>
#> 29 Survival of multiple myeloma patients 48 10 <NA>
#> 35 Survival of multiple myeloma patients 48 10 <NA>
#> 37 Survival of multiple myeloma patients 48 10 <NA>
#> 38 Survival of multiple myeloma patients 48 10 <NA>
#> 39 Survival of multiple myeloma patients 48 10 <NA>
#> 44 Survival of multiple myeloma patients 48 10 <NA>
#> 47 Survival of multiple myeloma patients 48 10 <NA>
#> 48 Survival of multiple myeloma patients 48 10 <NA>
#> 67 Survival of multiple myeloma patients 48 10 <NA>
# The alias is a copy of the data set
identical(d3.7, myeloma)
#> [1] TRUE