Create cohort attribute covariate settings

createCohortAttrCovariateSettings(analysisId = -1, attrDatabaseSchema,
  attrDefinitionTable = "attribute_definition",
  cohortAttrTable = "cohort_attribute", includeAttrIds = c(),
  isBinary = FALSE, missingMeansZero = FALSE)

Arguments

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?

Value

An object of type covariateSettings, to be used in other functions.

Details

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:

attribute_definition_id

A unique identifier of type integer.

attribute_name

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:

cohort_definition_id

A key to link to the cohort table.

subject_id

A key to link to the cohort table.

cohort_start_date

A key to link to the cohort table.

attribute_definition_id

An foreign key linking to the attribute definition table.

value_as_number

A real number.