Description Usage Arguments Details Value Author(s) References See Also
For a folder containing simulated encounter histories: reads in complete replicated encounter histories, subsets data if applicable, and runs an analysis function on each subsetted encounter history. Results are accumulated into a data.frame and written into a results output file.
1 | testReplicates(folder, Parameters, ... )
|
folder |
Folder containing encounter history files (full path). |
Parameters |
list of parameter values |
... |
additional arguments |
The main role of testReplicates
is to read in complete encounter histories, subset them based on varying sampling effort, and then run an analysis on each "observed" encounter history (e.g. subsetted file). The actual analysis that gets applied will be determined by the function specified with optional argument, function_name
. The default function, wolverine_analysis
, includes code from the original analysis used in Ellis et al. (2013).
Options for subsetting the encounter histories can be specified via Parameters
. The number of visits per year to test can be specified by Parameters$n_visit_test
, the proprotion of the grid included in the sample Parameters$grid_sample
, the detection probability per visit Parameters$detP_test
, and the sampling scheme by year Parameters$alt_model
. If these objects are not in the Parameters
list, the default values are:
Parameters$n_visit_test = 2:Parameters$n_visits
Parameters$detP_test = c(1,0.8,0.2)
Parameters$grid_sample = c(0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.75, 0.95)
Parameters$alt_model = c(0,1)
For Parameters$alt_model
, codes will need to match analyses in the function specified by function_name
. Using wolverine_analysis
, Parameters$alt_model = 0
indicates continuous sampling and Parameters$alt_model = 1
indicates alternate year sampling.
Additional arguements include
Optional argument skipConfirm
will bypass the user-confirmation for creating a folder structure. Defaults to FALSE
Optional argument results.file
specifies a file name for storing analysis results. Defauls to "sim_results.txt"
Optional argument base.name
must be specified if an alternative base file name was used in create.landscapes()
Optional argument FPC
indicates whether to use a finite population correction. FPC
defaults to TRUE; however, this option requires that a finite population correction is available in the analysis function.
Stores simulation results based on output specified in the analysis to sim_results.txt
. Returns time used for the function run.
By default, variables outputted to sim_results.txt
include:
p_est
Detection probability estimated from occupancy model
trend
Trend parameter estimate from GLM using occupancy ests and vcv
trendSE
Standard error of trend parameter
singular
Number of singularities from estimated occupancy model
X1
-X10
Occupancy estimates by year of simulation
n_grid
Number of cells used for observed encounter history (subset)
n_visits
Number of sampling occasions for subset
detP
Per visit detection probability for subset
alt_model
Alternative model specification for subset
rn
Base name for original complete encounter history file used for subset
Martha Ellis, Jake Ivan
ELLIS, MARTHA M., JACOB S. IVAN, and MICHAEL K. SCHWARTZ. "Spatially Explicit Power Analyses for Occupancy-Based Monitoring of Wolverine in the US Rocky Mountains." Conservation Biology (2013).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.