count: Extract Summaries

countR Documentation

Extract Summaries

Description

Reshape results from run.scenarios(..., extractfn = summary) so that they may be passed to the usual summary functions of secrdesign.

Usage


count(object, ...)

## S3 method for class 'summary'
predict(object, ...)
## S3 method for class 'summary'
coef(object, ...)
## S3 method for class 'summary'
count(object, ...)

Arguments

object

summary simulation output from run.scenarios

...

other arguments (not used)

Details

The aim is to extract numerical results from simulations performed using run.scenarios(..., extractfn = summary). The results may then be passed to the summary method for ‘secrdesign’ objects, possibly via select.stats (see Examples).

Value

An object of class c("estimatetables", "secrdesign", "list") in which the output component for each scenario is a list of dataframes, one per replicate. The structure of each dataframe is indicated in the following table (parameters may vary with model); ‘parameters’ and ‘statistics’ correspond to arguments of select.stats.

Function Row(s) Columns
(parameters) (statistics)
count Number Animals, Detections, Moves
coef D, g0, sigma estimate, SE.estimate, lcl, ucl
predict D, g0, sigma estimate, SE.estimate, lcl, ucl

See Also

predict.secr, coef.secr,

Examples


## generate some simulations
scen1 <- make.scenarios(D = c(5,10), sigma = 25, g0 = 0.2)
traps1 <- make.grid(6, 6, spacing = 25)
sims1 <- run.scenarios(nrepl = 2, trapset = traps1, scenarios =
     scen1, seed = 345, fit = TRUE, extractfn = summary)

## view the results
count(sims1)$output
predict(sims1)$output

summary(sims1)  ## header only

summary(count(sims1))   # equivalent to following
summary(select.stats(count(sims1), parameter = 'Number'))  

summary(predict(sims1)) # default select.stats parameter = 'D'
summary(select.stats(predict(sims1), parameter = 'sigma')  )


secrdesign documentation built on March 31, 2023, 10:25 p.m.