Plot prevalence results
plotPrevalence.Rd
Plot prevalence results
Arguments
- result
Prevalence results
- x
Variable to plot on x axis
- y
Variable to plot on y axis. Options are: "prevalence", "denominator_count", "outcome_count"
- ylim
Limits for the Y axis
- ribbon
If TRUE, the plot will join points using a ribbon
- facet
Variables to use for facets
- colour
Variables to use for colours
- options
A list of optional plot options. See optionsPlot() for the default parameters.
Examples
# \donttest{
cdm <- mockIncidencePrevalence(sampleSize = 1000)
cdm <- generateDenominatorCohortSet(
cdm = cdm, name = "denominator",
cohortDateRange = c(as.Date("2014-01-01"), as.Date("2018-01-01"))
)
#> ℹ Creating denominator cohorts
#> ✔ Cohorts created in 0 min and 3 sec
prev <- estimatePointPrevalence(
cdm = cdm,
denominatorTable = "denominator",
outcomeTable = "outcome"
)
#> Getting prevalence for analysis 1 of 1
#> Time taken: 0 mins and 0 secs
plotPrevalence(prev)
# }