robyn_converge: Check Models Convergence

View source: R/convergence.R

robyn_convergeR Documentation

Check Models Convergence

Description

robyn_converge() consumes robyn_run() outputs and calculate convergence status and builds convergence plots. Convergence is calculated by default using the following criteria (having kept the default parameters: sd_qtref = 3 and med_lowb = 2):

Criteria #1:

Last quantile's standard deviation < first 3 quantiles' mean standard deviation

Criteria #2:

Last quantile's absolute median < absolute first quantile's absolute median - 2 * first 3 quantiles' mean standard deviation

Both mentioned criteria have to be satisfied to consider MOO convergence.

Usage

robyn_converge(
  OutputModels,
  n_cuts = 20,
  sd_qtref = 3,
  med_lowb = 2,
  nrmse_win = c(0, 0.998),
  ...
)

Arguments

OutputModels

List. Output from robyn_run().

n_cuts

Integer. Default to 20 (5% cuts each).

sd_qtref

Integer. Reference quantile of the error convergence rule for standard deviation (Criteria #1). Defaults to 3.

med_lowb

Integer. Lower bound distance of the error convergence rule for median. (Criteria #2). Default to 3.

nrmse_win

Numeric vector. Lower and upper quantiles thresholds to winsorize NRMSE. Set values within [0,1]; default: c(0, 0.998) which is 1/500.

...

Additional parameters

Value

List. Plots and MOO convergence results.

Examples

## Not run: 
# Having OutputModels results
MOO <- robyn_converge(
  OutputModels,
  n_cuts = 10,
  sd_qtref = 3,
  med_lowb = 3
)

## End(Not run)

Robyn documentation built on June 27, 2024, 9:06 a.m.