First, a example population trajectory is simulated from the national model and a disturbance scenario.
Parameters specify a monitoring program that is applied to simulate observations from the example trajectory.
Parameters for the caribou monitoring program, disturbance scenario and the true population
trajectory can be specified with getScenarioDefaults()
.
simulateObservations(
paramTable,
cowCounts = NULL,
freqStartsByYear = NULL,
printPlot = FALSE,
collarNumYears = 4,
collarOffTime = 5,
collarOnTime = 8,
distScen = NULL,
populationGrowthTable = caribouMetrics::popGrowthTableJohnsonECCC,
survivalModelNumber = "M1",
recruitmentModelNumber = "M4",
writeFilesDir = NULL
)
data.frame. Parameters for the simulations. See
getScenarioDefaults()
for details.
data.frame. Optional. Number of cows counted in aerial
surveys each year. If NULL, and paramTable
contains cowMult
the number
of cows that survive calving based on the collar data is multiplied by
cowMult
to determine the number of cows counted in aerial surveys. If
paramTable
does not contain cowMult
paramTable$cowCount
is used to
set the number of cows counted in aerial surveys each year. If a data.frame
is provided it must have 3 columns "Year", "Count", and "Class" where class
is "cow" in all rows.
data.frame. Optional. Number of collars deployed in
each year. If NULL paramTable$collarCount
is used as the target number of
collars and each year that collars are deployed they will be topped up to
this number. If a data.frame is provided it must have 2 columns "Year" and
"numStarts" and the "numStarts" is the absolute number of collars deployed
in that year.
logical. print a plot of the true population trajectory?
integer. Number of years until collar falls off
integer. Month that collars fall off. A number from 1 (January) to 12 (December)
integer. Month that collars are deployed. A number from 1 (January) to 12 (December)
data.frame. Disturbance scenario. Must have columns "Year",
"Anthro", and "fire_excl_anthro" containing the year, percentage of the
landscape covered by anthropogenic disturbance buffered by 500 m, and the
percentage covered by fire that does not overlap anthropogenic disturbance.
See disturbanceMetrics()
. If NULL the disturbance scenario is simulated
based on paramTable
data.frame.popGrowthTableJohnsonECCC is included in the package and should be used in most cases. A custom table of model coefficients and standard errors or confidence intervals can be provided but it must match the column names of popGrowthTableJohnsonECCC. If the table does not contain the standard error it is calculated from the confidence interval.
character. Which model number to use see popGrowthTableJohnsonECCC for options.
characater. If not NULL simSurvObs
and ageRatioOut
results will be saved to csv files in the directory provided
a list with elements:
minYr: first year in the simulations,
maxYr: last year in the simulations,
simDisturbance: a data frame with columns Anthro, fire_excl_anthro, Total_dist, and Year,
simSurvObs: a data frame of survival data with columns id, Year, event, enter, and exit,
ageRatioOut: a data frame of calf cow counts for each year with columns Year, Count, and Class,
exData: a tibble of expected population metrics based on the national model,
paramTable: a data frame recording the input parameters for the simulation.
For a detailed description of the process for simulating data see the
vignette
(vignette("BayesianDemographicProjection", package = "caribouMetrics")
).
Caribou demography functions:
caribouBayesianPM()
,
caribouPopGrowth()
,
compositionBiasCorrection()
,
demographicCoefficients()
,
demographicProjectionApp()
,
demographicRates()
,
getOutputTables()
,
getPriors()
,
getScenarioDefaults()
,
getSimsNational()
,
plotRes()
,
popGrowthTableJohnsonECCC
,
runScnSet()
scns <- getScenarioDefaults(projYears = 10, obsYears = 10,
obsAnthroSlope = 1, projAnthroSlope = 5,
collarCount = 20, cowMult = 5)
simO <- simulateObservations(scns)