biasCorrection: RAnEnExtra::biasCorrection

Description Usage Arguments Author(s) References

View source: R/biasCorrection.R

Description

RAnEnExtra::biasCorrection carries out a bias correction routine on the analog ensembles using a linear regression method. This correction method is useful for predicting extreme event.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
biasCorrection(
  analogs,
  target.forecasts,
  historical.forecasts,
  similarity.time.index,
  similarity.station.index = NULL,
  regression.forecasts = NULL,
  regression.observations = NULL,
  forecast.id = NULL,
  activation.func = NULL,
  show.progress = T,
  return.more = F,
  group.func = mean,
  ...
)

Arguments

analogs

A four-dimensional array for analog values with the dimensions [stations, test times, lead times, members]. This is usually generated from the RAnEn::generateAnalogs.

target.forecasts

A three- or four- dimensional array for test forecasts that analogs are generated for. The dimensions can either be [stations, test times, lead times] or [stations, test times, lead times, 1]. The forecasts should be aligned with the anlaogs for the first three dimensions.

historical.forecasts

The historical forecast search repository with the dimensions [parameters, stations, times, lead times]. This is usually the Forecasts used in RAnEn::generateAnalogs.

similarity.time.index

Similarity time index for each analog members. To have this for your analogs, you need to set config$save_similarity_time_index = T before you run RAnEn::generateAnalogs.

similarity.station.index

Similarity station index for each analog members. To have this for your analogs, you need to set config$save_similarity_station_index = T and use SSE for analog generation.

regression.forecasts

The forecast values used to calculate the slope of a linear regression line. These forecasts must correspond to observations for regression.

regression.observations

The observation values used to calculate the slope of a linear regression line These observations must correspond to forecasts for regression.

forecast.id

A forecasts parameter index used by the historical.forecasts to specify which forecast parameter to use.

activation.func

An activation function to signify whether a particular ensemble should be bias corrected. This function should takes a single argument and return a TRUE or FALSE. The single argument of the function will be an analog ensemble, or a numeric vector. For example, activation.func = function(members) {if (mean(members) > 15) {return(T)} else {return(F)}} will only correct ensembles that have an average over 15.

show.progress

Whether to show a progress bar

return.more

Whether to return more information

group.func

How to collapse the analog ensemble to a single value to calculate the amount of correction. In the paper and by default, this is mean.

...

Additional variables passed to group.func

Author(s)

Weiming Hu weiming@psu.edu

Martina Calovi mxc895@psu.edu

References

Alessandrini, Stefano, Simone Sperati, and Luca Delle Monache. "Improving the analog ensemble wind speed forecasts for rare events." Monthly Weather Review 147.7 (2019): 2677-2692.


Weiming-Hu/RAnEnExtra documentation built on Sept. 26, 2021, 6:44 a.m.