Create covariate settings

createCovariateSettings(
  includeCovariateIds = NULL,
  excludeCovariateIds = NULL,
  label = "Covariates",
  stratifyById = TRUE,
  start = 0,
  addExposedDaysToStart = FALSE,
  end = 0,
  addExposedDaysToEnd = FALSE,
  firstOccurrenceOnly = FALSE,
  splitPoints = c(),
  allowRegularization = FALSE
)

Arguments

includeCovariateIds

One or more IDs of variables in the sccsData object that should be used to construct this covariate. If no IDs are specified, all variables will be used.

excludeCovariateIds

One or more IDs of variables in the sccsData object that should not be used to construct this covariate.

label

A label used to identify the covariates created using these settings.

stratifyById

Should a single covariate be created for every ID in the sccsData object, or should a single covariate be constructed? For example, if the IDs identify exposures to different drugs, should a covariate be constructed for every drug, or a single covariate for exposure to any of these drugs. Note that overlap will be considered a single exposure.

start

The start of the risk window in days, relative to the exposure start date.

addExposedDaysToStart

Should the length of exposure be added to the start date?

end

The start of the risk window in days, relative to the exposure start date.

addExposedDaysToEnd

Should the length of exposure be added to the end date?

firstOccurrenceOnly

Should only the first occurrence of the exposure be used?

splitPoints

To split the risk window into several smaller windows, specify the end of each sub- window relative to the start of the main risk window. If addExposedDaysToStart is TRUE, the split points will be considered to be relative to the end of the main risk window instead.

allowRegularization

When fitting the model, should the covariates defined here be allowed to be regularized?

Value

An object of type covariateSettings.

Details

Create an object specifying how to create a (set of) covariates.