PPPSSR | R Documentation |
Apply the SSR transformation.
Apply the SSR transformation. The SSR transformation replace the 0 by a random values between 0 and the minimal non zero value (the threshold). The inverse transform replace all values lower than the threshold by 0. The threshold used for inverse transform is given by the keyword 'isaved', which takes the value 'Y0' (reference in calibration period), or 'X0' (biased in calibration period), or 'X1' (biased in projection period)
SBCK::PrePostProcessing
-> PPPSSR
Xn
[vector] Threshold
new()
Create a new PPPSSR object.
PPPSSR$new(cols = NULL, isaved = "Y0", ...)
cols
Columns to apply the SSR
isaved
Choose the threshold used for the inverse transform. Can be "Y0", "X0" and "X1".
...
Others arguments are passed to PrePostProcessing
A new 'PPPSSR' object.
transform()
Apply the SSR transform, i.e. all 0 are replaced by random values between 0 (excluded) and the minimal non zero value.
PPPSSR$transform(X)
X
Data to transform
Xt a transformed matrix
itransform()
Apply the inverse SSR transform, i.e. all values lower than the threshold found in the transform function are replaced by 0.
PPPSSR$itransform(Xt)
Xt
Data to transform
X a transformed matrix
clone()
The objects of this class are cloneable with this method.
PPPSSR$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Start with data
XY = SBCK::dataset_like_tas_pr(2000)
X0 = XY$X0
X1 = XY$X1
Y0 = XY$Y0
## Define the PPP method
ppp = PPPSSR$new( bc_method = CDFt , cols = 2 )
## And now the correction
## Bias correction
ppp$fit(Y0,X0,X1)
Z = ppp$predict(X1,X0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.