bias_correction: Calibrating the bias of observed data

Description Usage Arguments Value Examples

View source: R/bias_correction.R

Description

Using different methods to calibrate the systematic bias between observed and true data.

Usage

1
bias_correction(train.obs, train.true, test.obs, method = "empirical_quantile")

Arguments

train.obs

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

train.true

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

test.obs

a numeric vector of test observed data to be calibrated.

method

a character indicating the chosen bias correction method; linear_scaling: the linear scaling method, fitting the relationship between observed and true data by a linear model; empirical_quantile: the empirical quantile mapping method, mapping the quantiles between the empirical cumulative density functions of observed and true data.

Value

a numeric vector that contains the corrected test.obs data.

Examples

1
2
3
4
bc_train_obs = c(0:8,9,9,9,9)
bc_test_obs = c(1:9,10,10,10,10)
bc_train_true = c(3:11,15,15,15,15)
bc_test_corrected = bias_correction(bc_train_obs, bc_train_true, bc_test_obs)

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