Learn R Programming

secrdesign (version 2.9.2)

rbind.estimatetables: Combine Simulation Output

Description

Methods to combine output from separate executions of run.scenarios.

Usage

# S3 method for estimatetables
rbind(..., deparse.level = 1)

# S3 method for selectedstatistics rbind(..., deparse.level = 1)

# S3 method for estimatetables c(...)

# S3 method for selectedstatistics c(...)

Value

`estimatetables' or `selectedstatistics' object combining the inputs

Arguments

...

estimatetables or selectedstatistics output from run.scenarios

deparse.level

not used (required by generic method rbind)

Details

rbind assumes all inputs used exactly the same scenarios. Replicate estimate tables are combined across executions for each scenario in turn. This is useful to increase the number of replicates by combining two batches of simulations with different random seeds. The `scenarios' component remains unchanged.

c combines outputs from run.scenarios that may differ in their scenarios. The `output' component of the result is a concatenation of the output lists in the input. The `scenarios' component of the result comprises the input scenarios stacked with rbind.data.frame.

The compatibility of the inputs is checked, but the checks are not exhaustive. Users should be wary.

See Also

make.scenarios run.scenarios

Examples

Run this code

## Simple example: generate and summarise trapping data at two densities
## result inherits from 'selectedstatistics'

scen1 <- make.scenarios(D = c(5,10), sigma = 25, g0 = 0.2, noccasions = 5)
traps1 <- make.grid()   ## default 6 x 6 trap grid
tmp1 <- run.scenarios(nrepl = 5, trapset = traps1, scenarios = scen1,
    fit = FALSE, seed = 123)
tmp2 <- run.scenarios(nrepl = 15, trapset = traps1, scenarios = scen1,
    fit = FALSE, seed = 127)
    
summary(rbind(tmp1,tmp2))    
summary(c(tmp1,tmp2))    

Run the code above in your browser using DataLab