Plot Fertility Rates Statistics

PlotFertilityRatesStats(results, se = FALSE, type = "lines", log = TRUE)

Arguments

results

Results list (as returned by RunExperiments())

se

Whether to show standard error or standard deviation confidence intervals. Note: the se parameter does not apply to the "boxplot" type.

type

Plot type (options = "lines", "ribbon", "boxplot")

log

Use log scale for rates (default = TRUE). Applies only to "boxplot" type.

Value

ggplot grob

Examples

if (FALSE) {
library(pacehrh)

pacehrh::InitializePopulation()
pacehrh::InitializeScenarios()
pacehrh::InitializeStochasticParameters()
pacehrh::InitializeSeasonality()

scenario <- "ScenarioName"

results <-
  pacehrh::RunExperiments(
    scenarioName = scenario,
    trials = 100
  )

g <- pacehrh::PlotFertilityRatesStats(results, type = "boxplot", log = FALSE)
print(g)

g <- pacehrh::PlotFertilityRatesStats(results, type = "boxplot", log = TRUE)
print(g)

g <- pacehrh::PlotFertilityRatesStats(results, se = FALSE, type = "lines")
print(g)

g <- pacehrh::PlotFertilityRatesStats(results, se = TRUE, type = "lines")
print(g)

g <- pacehrh::PlotFertilityRatesStats(results, se = FALSE, type = "ribbon")
print(g)

g <- pacehrh::PlotFertilityRatesStats(results, se = TRUE, type = "ribbon")
print(g)
}