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 )
sccsData | An object of type |
---|---|
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 |
ageSettings | An object of type |
seasonalitySettings | An object of type |
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? |
An object of type sccsIntervalData
.
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.
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