test_file: Default function for analyzing an individual encounter...

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

Description

Original function designed for analyzing wolverine encounter histories in Ellis et al. 2013.

Usage

1
wolverine_analysis(n_yrs, ch = NULL, n_visit = NULL, sample_yr = 0, FPC = 1, ... )

Arguments

n_yrs

Number of years in the encounter history. Run with all else NULL to produce an initial data.frame for setting up further results.

ch

Character vector with encounters

n_visit

Number of visits per year

sample_yr

Code for possible alternate model formulations

FPC

Finite population correction

...

additional arguments

Details

This function provides an example of an analysis function, which will be called by testReplicates on each individual encounter history. Should include appropriate model options for every subset of encounter histories. Returns a dataframe with results from current simulation, which will be compiled into a single output file by testReplicates. Can include multiple model runs on the same encounter history by returning a data.frame with multiple lines.

The current function runs a robust design occupancy model through RMark with options for continuous or alternate year sampling. Trend is tested using variance.components procedure.

Value

data.frame with model results

Default output from wolverine_analysis include the estimated detection probability p_est from the occupancy model, trend parameter estimate and standard error from GLM fit trend and trendSE, the number of singular parameters in the estimated occupancy model singular, and the occupancy estimates by year X1-X10. Due to violation of closure assuption in RDoccup model p_est includes effects of both imperfect detection (recorded via detP) and underlying use/non-use for each cell in each year.

Note

The analysis function you give testReplicates via function_name will get called in two places in testReplicates. First, it will get called by RunAnalysis(n_yrs) to set up a header for the eventual results data.frame. Then it will get called in each step of the loop over all the subsetted encounter history files using RunAnalysis(n_yrs, ch, n_visit, sample_yr,fpc , ... ). This is clunky, but for now, if you want to change wolverine_analysis, you need to make sure the function you specify will work with those two function calls.

Author(s)

Jake Ivan, Martha Ellis

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

test_samples


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