calcPMs: (Calibration Performance) Group Performance Measures

Description Usage Arguments Details Value Examples

Description

A wrapper to calculate multiple performance measures.

Usage

1
2
3
4
calcPMs(data.combined, datasubset = c("escapement", "terminalrun"),
  pm = list(PBSperformance::mre, PBSperformance::mae,
  PBSperformance::mpe, PBSperformance::mape, PBSperformance::rmse),
  samplesize.min = 10, writecsv = TRUE, results.path = ".", ...)

Arguments

data.combined

A dataframe. Output of importFCSCCC.

datasubset

A character vector defining the values from data.type to be selected.

pm

A list of performance measures to calculate.

writecsv

A Boolean confirming if output should also be written to a csv file.

Details

This is a convenient wrapper that estimates one or more performance measures for the data supplied. This function is somewhat specialized for use on CTC calibration model comparisons (most often against values in the *.fcs files. The output from the mergeFCSCCC function is what normally would be used for the argument data.combined. This function expects data.combined to include columns with names: calibration, stock, data.type, agegroup, value.fcs, value.ccc. The latter two columns are, respectively, the data that will be used in the arguments: expect and obs of the various performance metric functions.

Value

The function returns a dataframe comprising the performance metrics requested, grouped by calibration, stock, data.type, and agegroup.

Examples

1
metrics <- calcPMs(data.combined, pm = list(PBSperformance::mpe,  PBSperformance::mape), writecsv = TRUE, samplesize.min = samplesize.min, results.path = model.list$results.path)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.