Create a study population
createStudyPopulation(cohortMethodData, population = NULL, outcomeId, firstExposureOnly = FALSE, restrictToCommonPeriod = FALSE, washoutPeriod = 0, removeDuplicateSubjects = FALSE, removeSubjectsWithPriorOutcome = TRUE, priorOutcomeLookback = 99999, minDaysAtRisk = 1, riskWindowStart = 0, addExposureDaysToStart = NULL, startAnchor = "cohort start", riskWindowEnd = 0, addExposureDaysToEnd = NULL, endAnchor = "cohort end", censorAtNewRiskWindow = FALSE)
An object of type
If specified, this population will be used as the starting
point instead of the cohorts in the
The ID of the outcome. If not specified, no outcome-specific transformations will be performed.
Should only the first exposure per subject be included? Note
that this is typically done in the
Restrict the analysis to the period when both exposures are observed?
The mininum required continuous observation time prior to index date for a person to be included in the cohort.
Remove subjects that are in both the target and comparator cohort? See details for allowed values.
Remove subjects that have the outcome prior to the risk window start?
How many days should we look back when identifying prior outcomes?
The minimum required number of days at risk.
The start of the risk window (in days) relative to the
DEPRECATED: Add the length of exposure the start of the risk window?
The anchor point for the start of the risk window. Can be "cohort start" or "cohort end".
The end of the risk window (in days) relative to the
DEPRECATED: Add the length of exposure the risk window?
The anchor point for the end of the risk window. Can be "cohort start" or "cohort end".
If a subject is in multiple cohorts, should time-at-risk be censored when the new time-at-risk starts to prevent overlap?
A data frame specifying the study population. This data frame will have the following columns:
A unique identifier for an exposure
The person ID of the subject
The index date
The number of outcomes observed during the risk window
The number of days in the risk window
The number of days until either the outcome or the end of the risk window
Create a study population by enforcing certain inclusion and exclusion criteria, defining a risk window, and determining which outcomes fall inside the risk window.
removeduplicateSubjects argument can have one of the following values:
Do not remove subjects that appear in both target and comparator cohort
When a subjects appear in both target and comparator cohort, only keep whichever cohort is first in time. If both cohorts start simultaneous, the person is removed from the analysis.
Remove subjects that appear in both target and comparator cohort completely from the analysis."