measurebias: measurebias

View source: R/measurebias.R

measurebiasR Documentation

measurebias

Description

Measures the amount of bias introduced to the training set due to incorrect computation of (N)SPI prior to out-of-sample validation

Usage

measurebias(
  x,
  trainratio,
  validationratio,
  testratio,
  stationaryspi,
  spiscale,
  dist = "gamma"
)

Arguments

x

data.table with rainfall records (Date, Rainfall)

trainratio

numeric; the proportion of the train set

validationratio

numeric; the proportion of the validation set

testratio

numeric; the proportion of the test set

stationaryspi

logical; When TRUE SPI is calculated; when FALSE NSPI is calculated

spiscale

integer; the scale of accumulated precipitation

dist

A character that can be either, "normal" when Normal distribution is used, "gamma" for Gamma, "zigamma" for zero adjusted Gamma and "weibull" for Weibull.

Value

list

Examples

rainfall = dummyrainfall(1950, 2000)
measurebias(rainfall, 0.6, 0.2, 0.2, TRUE, 12, "normal")

mammask/droughtR documentation built on Feb. 25, 2024, 2:26 p.m.