test_samples: Analyze a set of replicate encounter histories

Description Usage Arguments Details Value Author(s) References See Also

View source: R/Test_Samples.r

Description

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.

Usage

1
testReplicates(folder, Parameters, ... )

Arguments

folder

Folder containing encounter history files (full path).

Parameters

list of parameter values

...

additional arguments

Details

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:

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.

Value

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:

Author(s)

Martha Ellis, Jake Ivan

References

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).

See Also

wolverine_analysis


rSPACE documentation built on May 29, 2017, 11:37 a.m.