Learn R Programming

SeaVal (version 1.1.1)

add_tercile_probs: Add tercile probabilities to ensemble forecasts

Description

Adds columns 'below', 'normal' and 'above', containing predicted tercile probabilities, to a data table with ensemble forecasts. The predicted probability is always the fraction of members ending up in the respective tercile. The data table should either already have a column 'tercile_cat' (added by add_tercile_cat), or add_tercile_cat will be run first.

Usage

add_tercile_probs(dt, f = NULL, by = setdiff(dimvars(dt), "member"), ...)

Value

The provided data table, with added columns 'above', 'normal', and 'below'

Arguments

dt

the data table.

f

name of the column containing the forecast.

by

names of columns to group by

...

passed on to add_tercile_cat.

Examples

Run this code
# \donttest{
dt = add_tercile_probs(ecmwf_monthly)
# }

Run the code above in your browser using DataLab