eqm_bias_correction: Calibrating the bias of observed data by empirical quantile...

Description Usage Arguments Value

View source: R/eqm_bias_correction.R

Description

Performing empirical quantile distribution mapping to correct bias in the observation data, the "truth" quantiles are given as reference data.

Usage

1
2
3
4
5
6
7
eqm_bias_correction(
  train.obs,
  train.datetime,
  test.obs,
  test.datetime,
  true.quantiles
)

Arguments

train.obs

a numeric vector of training observed data to build the bias correction model.

train.datetime

a sequence of timestamps in train.obs.

test.obs

a numeric vector of test observed data to be calibrated, could be the same as train.obs.

test.datetime

a sequence of timestamps in test.obs.

true.quantiles

a list of six numeric vectors of the "truth" quantiles to build the bias correction model, the corresponding cumulative probability stamps must be evenly spreaded between 0 and 1. If not satisfied, a pseudo "truth" observation numeric vector satisfying the quantiles should be provided. We suggest using quantiles with cumulative probability from 0.01 to 1 with interval length 0.01 (100 quantiles in total). We use Weibull distribution with maximum likelihood estimation to fit these quantiles (in R package fitdistrplus).

Value

a numeric vector that contains the corrected test_after_bc for the test data.


jieyu97/QCwind documentation built on June 18, 2021, 3:37 a.m.