prepare_cohort: <Private function> Prepare the skeleton cohort for subsequent...

View source: R/km_type_weights.R

prepare_cohortR Documentation

<Private function> Prepare the skeleton cohort for subsequent steps.

Description

<Private function> Prepare the skeleton cohort for subsequent steps.

Usage

prepare_cohort(
  cohort,
  t_start_name,
  t_name,
  y_name,
  match_var_names,
  print_message = TRUE
)

Arguments

cohort

Cohort data with at least the following information on each subject: start time (if not 0 for all subjects) and end time of follow-up, censoring status and matching variables (if any). A data.frame or a matrix with column names.

t_start_name

Name of the variable in cohort for the start time of follow-up. A string.

t_name

Name of the variable in cohort for the event or censoring time. A string.

y_name

Name of the column of censoring status in each matched set in cohort, with 1 for event and 0 for censoring. A string.

match_var_names

Name(s) of the match variable(s) in cohort used when drawing the NCC. A string vector.

print_message

Whether to print the message regarding start and exit time. Default is TRUE.


nyilin/SamplingDesignTools documentation built on Nov. 20, 2022, 8:07 a.m.