| bastaCensDat {BaSTA} | R Documentation |
Example of census data for BaSTA analysis.
Description
Simulated census data (i.e., continuous observation of individuals) for Bayesian Survival Trajectory Analysis (BaSTA).
Usage
data("bastaCensDat")
Format
A data frame with 500 observations on the following 8 variables.
IDID for each individual.
Birth.DateDates of birth, formated as “
YYYY-mm-dd”.Min.Birth.DateMinimum estimated dates of birth, formated as “
YYYY-mm-dd”. If the date of birth is known, thenMin.Birth.Dateis equal toBirth.Date.Max.Birth.DateMaximum estimated dates of birth, formated as “
YYYY-mm-dd”. If the date of birth is known, thenMax.Birth.Dateis equal toBirth.DateEntry.DateDates of entry to the study, formated as “
YYYY-mm-dd”.Depart.DateDates of departure from the study, formated as “
YYYY-mm-dd”.Depart.Typea character vector indicating whether the
Depart.Dateis because of death (i.e., “D”) or censored (i.e., “C”).Sexa character vector indicating the sex covariate.
Details
This dataset was created by stochastically simulating a hypothetical population with different mortality patterns between males and females and with proportional decreases in mortality as a function of a hypothetical continuous covariate (e.g. birth weight, average adult weight, etc.). The population was simulated for 40 years, with uniform times of birth within this period. Sex ratios were assumed to be 1:1. The time of death for each individual was inversed sampled from a Gompertz CDF of ages at death. The Gompertz parameters for females were: b_0 = -3 and b_1 = 0.15; and for males at b_0 = -2 and b_1 = 0.2.
The resulting dataset includes individuals where the data are left-truncated and/or right-censored. This is typical of capture mark recovery datasets.
Examples
## Load data:
data("bastaCensDat", package = "BaSTA")
## Check data consistency:
checkedData <- DataCheck(bastaCensDat, dataType = "census")