Description Usage Arguments Value Author(s) Examples
Generates simulation replicates of double observer survey data with a known (marked) and unmarked portion of the population with or without group sizes. Fits a sequence of models, and reports average abundance, average std error, confidence interval coverage for each model and model average estimate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
reps |
number of simulation replicates |
n |
number of unmarked groups |
nradios |
number of marked groups |
beta |
vector of parameters for detection model specified in gen_formula |
gen_formula |
formula specified as character for generating detection probabilities for simulated data |
p0 |
proportion of population that has 0 probability of detection |
data |
dataframe containing covariate data if something other than loc or cov (unmodelled heterogeneity); number of rows should match n+nradios |
fit_formula |
character portion of the formula used to fit to observed double observer data excluding heterogeneity portion; use lngs for log group size |
use_gs |
if TRUE, generate random group sizes from gamma distribution (integerized) with parameters in gs_param below |
gs_param |
vector of 2 parameters for gamma distribution; gs_param[1]=scale and gs_param[2]=shape;see ?rgamma |
which |
logical vector indicating which of the 6 models are fitted to the data |
seed |
if NULL uses random seed, but if a value is used it can be used to repeat results from same seed |
list containing: 1) abundance estimate (either groups or animals) , 2) std error, 3) lower 95 percent confidence limit, 4) upper 95 percent confidence limit, 5) cover = 1 if TrueN in interval, 6) missed_low=1 if TrueN less than lower limit, and 7) missed_high=1 if TrueN greater than upper limit.
Jeff Laake
1 2 3 4 5 6 7 | # runs 3 replicates as an example with parameters used to generate example_data and
# fits models with no terms other than loc and residual heterogeneity and others
# that added some combination of veg and lngs.
simres=simhet(3,150,25,beta=c(-.5,-.5,-1,2,.5),data=data.frame(veg=runif(175)),
gen_formula="~-1+loc+veg+cov+lngs",fit_formula=c("veg+lngs","lngs","veg",""),
use_gs=TRUE,gs_param=c(1,10),seed=9234397)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.