View source: R/GetCovariatesFromCohortAttributes.R
createCohortAttrCovariateSettings | R Documentation |
Create cohort attribute covariate settings
createCohortAttrCovariateSettings(
analysisId = -1,
attrDatabaseSchema,
attrDefinitionTable = "attribute_definition",
cohortAttrTable = "cohort_attribute",
includeAttrIds = c(),
isBinary = FALSE,
missingMeansZero = FALSE
)
analysisId |
A unique identifier for this analysis. |
attrDatabaseSchema |
The database schema where the attribute definition and cohort attribute table can be found. |
attrDefinitionTable |
The name of the attribute definition table. |
cohortAttrTable |
The name of the cohort attribute table. |
includeAttrIds |
(optional) A list of attribute definition IDs to restrict to. |
isBinary |
Needed for aggregation: Are these binary variables? Binary variables should only have the values 0 or 1. |
missingMeansZero |
Needed for aggregation: For continuous values, should missing values be interpreted as 0? |
Creates an object specifying where the cohort attributes can be found to construct covariates. The attributes should be defined in a table with the same structure as the attribute_definition table in the Common Data Model. It should at least have these columns:
A unique identifier of type integer.
A short description of the attribute.
The cohort attributes themselves should be stored in a table with the same format as the cohort_attribute table in the Common Data Model. It should at least have these columns:
A key to link to the cohort table.
A key to link to the cohort table.
A key to link to the cohort table.
An foreign key linking to the attribute definition table.
A real number.
An object of type covariateSettings
, to be used in other functions.
covariateSettings <- createCohortAttrCovariateSettings(
analysisId = 1,
attrDatabaseSchema = "main",
attrDefinitionTable = "attribute_definition",
cohortAttrTable = "cohort_attribute",
includeAttrIds = c(1),
isBinary = FALSE,
missingMeansZero = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.