Create SCCS era data

createSccsIntervalData(
  sccsData,
  outcomeId = NULL,
  naivePeriod = 0,
  firstOutcomeOnly = FALSE,
  covariateSettings,
  ageSettings = createAgeSettings(includeAge = FALSE),
  seasonalitySettings = createSeasonalitySettings(includeSeasonality = FALSE),
  minCasesForAgeSeason = 10000,
  eventDependentObservation = FALSE
)

Arguments

sccsData

An object of type sccsData as created using the getDbSccsData function.

outcomeId

The outcome to create the era data for. If not specified it is assumed to be the one outcome for which the data was loaded from the database.

naivePeriod

The number of days at the start of a patient's observation period that should not be included in the risk calculations. Note that the naive period can be used to determine current covariate status right after the naive period, and whether an outcome is the first one.

firstOutcomeOnly

Whether only the first occurrence of an outcome should be considered.

covariateSettings

Either an object of type covariateSettings as created using the createCovariateSettings function, or a list of such objects.

ageSettings

An object of type ageSettings as created using the createAgeSettings function.

seasonalitySettings

An object of type seasonalitySettings as created using the createSeasonalitySettings function.

minCasesForAgeSeason

Minimum number of cases to use to fit age and season splines. IF needed (and available), cases that are not exposed will be included.#'

eventDependentObservation

Should the extension proposed by Farrington et al. be used to adjust for event-dependent observation time?

Value

An object of type sccsIntervalData.

Details

This function creates covariates based on the data in the sccsData object, according to the provided settings. It chops patient time into periods during which all covariates remain constant. The output details these periods, their durations, and a sparse representation of the covariate values.

References

Farrington, C. P., Anaya-Izquierdo, A., Whitaker, H. J., Hocine, M.N., Douglas, I., and Smeeth, L. (2011). Self-Controlled case series analysis with event-dependent observation periods. Journal of the American Statistical Association 106 (494), 417-426