Plot Bayesian population model results, with (optionally) the distribution of outcomes from the national model, local observations, and true local state for comparison.
plotRes(
modTables,
parameter,
lowBound = 0,
highBound = 1,
facetVars = NULL,
labFontSize = 14,
ksDists = FALSE,
legendPosition = "right",
breakInterval = 1
)
list. A list of model results tables created using
[getOutputTables()]
.
character. Which parameter to plot, if more than one, a list of plots is returned.
numeric. Lower and upper y axis limits
character. Optional. Vector of column names to facet by
numeric. Optional. Label font size if there are not facets. Font size is 10 pt if facets are used.
logical. If true the modTables$ksDists
table is used to
create plots for each parameter.
"bottom", "right", "left","top", or "none". Legend position.
number. How many years between x tick marks?
a ggplot object or list of ggplot objects if a vector of parameters was given.
Caribou demography functions:
caribouBayesianPM()
,
caribouPopGrowth()
,
compositionBiasCorrection()
,
demographicCoefficients()
,
demographicProjectionApp()
,
demographicRates()
,
getOutputTables()
,
getPriors()
,
getScenarioDefaults()
,
getSimsNational()
,
popGrowthTableJohnsonECCC
,
runScnSet()
,
simulateObservations()
scns <- getScenarioDefaults(projYears = 10, obsYears = 10,
obsAnthroSlope = 1, projAnthroSlope = 5,
collarCount = 20, cowMult = 5)
simO <- simulateObservations(scns)
out <- caribouBayesianPM(survData = simO$simSurvObs, ageRatio = simO$ageRatioOut,
disturbance = simO$simDisturbance,
startYear = 2014, Nchains = 1, Niter = 100, Nburn = 10,
Nthin = 2)
#> Warning: warning, low sample size of adult females in at least one year
#> using Kaplan-Meier survival model
out_tbl <- getOutputTables(out, exData = simO$exData, paramTable = simO$paramTable,
simNational = getSimsNational(), getKSDists = FALSE)
#> Using saved object
plotRes(out_tbl, parameter = "Recruitment")