View source: R/simulateObservations.R
simulateObservations | R Documentation |
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
)
paramTable |
data.frame. Parameters for the simulations. See
|
cowCounts |
data.frame. Optional. Number of cows counted in aerial
surveys each year. If NULL, and |
freqStartsByYear |
data.frame. Optional. Number of collars deployed in
each year. If NULL |
printPlot |
logical. print a plot of the true population trajectory? |
collarNumYears |
integer. Number of years until collar falls off |
collarOffTime |
integer. Month that collars fall off. A number from 1 (January) to 12 (December) |
collarOnTime |
integer. Month that collars are deployed. A number from 1 (January) to 12 (December) |
distScen |
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 |
populationGrowthTable |
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. |
survivalModelNumber , recruitmentModelNumber |
character. Which model number to use see popGrowthTableJohnsonECCC for options. |
writeFilesDir |
characater. If not NULL |
For a detailed description of the process for simulating data see the
vignette
(vignette("BayesianDemographicProjection", package = "caribouMetrics")
).
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.