#' Simulated data with non-proportional hazards and independent double truncation
#'
#' @description
#' The event times were simulated from a Cox model with hazard function
#' \deqn{\lambda(t|x,\textit{group}) = \exp\{0.7\textit{group}\times 1(t \leq 0.6) - 0.5x\}\lambda_0(t-0.1)}
#' where \eqn{\lambda_0(t)} is the hazard function from a beta(2,2) distribution.
#' The covariates \eqn{\textit{group}} and \eqn{x} were independent bernoulli(0.5)
#' and uniform(0,1) random variates, respectively.
#'
#' The left truncation time had a uniform(0,0.6) distribution,
#' while the time between the left and right truncation time was an independent
#' uniform(0.1,0.7) random variate.
#' All times were rounded to two decimal places.
#'
#' @format
#' A data frame with 490 rows and 5 columns:
#' \describe{
#'   \item{`ltrunc`}{The left truncation time.}
#'   \item{`rtrunc`}{The right truncation time.}
#'   \item{`event_time`}{The event time.}
#'   \item{`group`}{A binary covariate with non-proportional hazards.}
#'   \item{`x`}{A continuous covariate with proportional hazards.}
#' }
"nonprop_sample"

#' AIDS incubation data
#'
#' @description
#' A doubly truncated dataset of AIDS incubation times from patients with
#' transfusion-acquired HIV collected by the Centers for Disease Control and
#' Prevention (CDC). The sample contains patients who were diagnosed between
#' the discovery of the disease (1982) and the end of study (July 1986), with
#' infection times determined retrospectively from a blood transfusion registry.
#'
#' @format
#' A data frame with 295 rows and 5 columns:
#' \describe{
#'   \item{`incu`}{The incubation time, i.e. months from HIV infection to AIDS
#'     diagnosis.}
#'   \item{`age`}{The age at HIV infection in years.}
#'   \item{`ltrunc`}{The time from HIV infection to the start of data collection
#'     (1982), in months.
#'     Note that `ltrunc` is negative for patients infected before 1982.}
#'   \item{`rtrunc`}{The time from HIV infection to the end of data collection
#'     (July 1986), in months.}
#'   \item{`age_gp`}{A factor with three `age` groups: `<=4`, `4-59`, and `>59`
#'     (the baseline level).}
#' }
#' @source
#' Wang, M. -C. (1989). A semiparametric model for randomly truncated data.
#' *Journal of the American Statistical Association*, **84**(407), 742--748.
"aids"
