Learn R Programming

secrdesign (version 2.9.2)

transformOutput: Transform Simulation Output

Description

Transform output component of simulation output from run.scenarios. Typically this replaces an entire saved model fit with a table of estimates from that fit.

Usage

transformOutput(object, extractfn, outputtype = "predicted", ...)

Value

An object resembling the output from run.scenarios but with transformed output. The outputtype and class of the object are changed to match `outputtype'.

Arguments

object

output from run.scenarios

extractfn

function such as the `extractfn' argument of run.scenarios

outputtype

character (see Details)

...

other arguments passed to extractfn

Details

Each replicate of each scenario is transformed using `extractfn', which should accept as input the object returned by the extractfn of the original call to run.scenarios. As a typical example, sims <- run.scenarios(..., fit = TRUE, extractfn = identity) returns outputs of class `secr' and could be followed by sims2 <- transformOutput(sims, predict); sims2 may be used as input to estimateSummary and other summary functions.

See Also

run.scenarios, estimateSummary, outputtype<-