View source: R/dataConstruction_workflow.R
| setCohort | R Documentation |
The cohort dataset specifies for each subject in the cohort:
a unique subject identifier,
the date of study entry,
the date of end of follow-up,
the reason for end of follow-up (failure or right-censoring), and
baseline measurements of time-dependent or time-independent covariates.
setCohort(
data,
IDvar,
index_date,
EOF_date,
EOF_type,
Y_name,
L0,
L0_timeIndep = NA
)
data |
|
IDvar |
|
index_date |
|
EOF_date |
|
EOF_type |
|
Y_name |
|
L0 |
vector of |
L0_timeIndep |
named list specifying, for each time-independent covariates in
Each element of the list |
cohortData object
cohortData
cohort <- setCohort(cohortDT, "ID", "IndexDate", "EOFDate", "EOFtype",
"AMI", c("ageEntry", "sex", "race", "A1c", "eGFR"),
list("ageEntry"=list("categorical"=FALSE,
"impute"=NA,
"impute_default_level"=NA),
"sex"=list("categorical"=TRUE,
"impute"=NA,
"impute_default_level"=NA),
"race"=list("categorical"=TRUE,
"impute"=NA,
"impute_default_level"=NA)) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.