Description Usage Arguments Details Value
View source: R/StudyPopulation.R
Create a study population
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | createStudyPopulation(
plpData,
population = NULL,
outcomeId,
binary = T,
includeAllOutcomes = T,
firstExposureOnly = FALSE,
washoutPeriod = 0,
removeSubjectsWithPriorOutcome = TRUE,
priorOutcomeLookback = 99999,
requireTimeAtRisk = T,
minTimeAtRisk = 365,
riskWindowStart = 0,
addExposureDaysToStart = FALSE,
riskWindowEnd = 365,
addExposureDaysToEnd = F,
verbosity = "INFO",
...
)
|
plpData |
An object of type |
population |
If specified, this population will be used as the starting point instead of the
cohorts in the |
outcomeId |
The ID of the outcome. If not specified, no outcome-specific transformations will be performed. |
binary |
Forces the outcomeCount to be 0 or 1 (use for binary prediction problems) |
includeAllOutcomes |
(binary) indicating whether to include people with outcomes who are not observed for the whole at risk period |
firstExposureOnly |
Should only the first exposure per subject be included? Note that
this is typically done in the |
washoutPeriod |
The mininum required continuous observation time prior to index date for a person to be included in the cohort. |
removeSubjectsWithPriorOutcome |
Remove subjects that have the outcome prior to the risk window start? |
priorOutcomeLookback |
How many days should we look back when identifying prior outcomes? |
requireTimeAtRisk |
Should subject without time at risk be removed? |
minTimeAtRisk |
The minimum number of days at risk required to be included |
riskWindowStart |
The start of the risk window (in days) relative to the index date (+
days of exposure if the |
addExposureDaysToStart |
Add the length of exposure the start of the risk window? |
riskWindowEnd |
The end of the risk window (in days) relative to the index data (+
days of exposure if the |
addExposureDaysToEnd |
Add the length of exposure the risk window? |
verbosity |
Sets the level of the verbosity. If the log level is at or higher in priority than the logger threshold, a message will print. The levels are:
|
... |
Other inputs |
Create a study population by enforcing certain inclusion and exclusion criteria, defining a risk window, and determining which outcomes fall inside the risk window.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.