graphics.Rmd
In this note we describe the graphing functions built into the pacehrh package.
… creating some data.
library(pacehrh)
pacehrh::InitializePopulation()
pacehrh::InitializeScenarios()
pacehrh::InitializeStochasticParameters()
pacehrh::InitializeSeasonality()
pacehrh::InitializeCadreRoles()
scenario <- "MergedModel"
pacehrh::SetGlobalStartEndYears(2025, 2050)
results <-
pacehrh::RunExperiments(scenarioName = scenario,
trials = 25)
The function PlotFertilityRatesStats()
creates graphs of
the fertility and mortality rates used to generate population
predictions.
type = "boxplot"
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)