Plot the outcome incidence over time
outcomeSurvivalPlot(
plpData,
outcomeId,
removeSubjectsWithPriorOutcome = T,
riskWindowStart = 1,
riskWindowEnd = 3650,
riskTable = T,
confInt = T,
yLabel = "Fraction of those who are outcome free in target population"
)
The plpData object returned by running getPlpData()
The cohort id corresponding to the outcome
Remove patients who have had the outcome before their target cohort index date from the plot
(integer) The time-at-risk starts at target cohort index date plus this value
(integer) The time-at-risk ends at target cohort index date plus this value
(binary) Whether to include a table at the bottom of the plot showing the number of people at risk over time
(binary) Whether to include a confidence interval
(string) The label for the y-axis
TRUE if it ran
This creates a survival plot that can be used to pick a suitable time-at-risk period