| PPPFunctionLink | R Documentation |
Base class to build link function pre-post processing class. See also the PrePostProcessing documentation
This class is used to define pre/post processing class with a link function and its inverse. See example.
SBCK::PrePostProcessing -> PPPFunctionLink
new()Create a new PPPFunctionLink object.
PPPFunctionLink$new(transform_, itransform_, cols = NULL, ...)
transform_The transform function
itransform_The inverse transform function
colsColumns to apply the link function
...Others arguments are passed to PrePostProcessing
A new 'PPPFunctionLink' object.
transform()Apply the transform.
PPPFunctionLink$transform(X)
XData to transform
Xt a transformed matrix
itransform()Apply the inverse transform.
PPPFunctionLink$itransform(Xt)
XtData to transform
X a transformed matrix
clone()The objects of this class are cloneable with this method.
PPPFunctionLink$clone(deep = FALSE)
deepWhether 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 link function
transform = function(x) { return(x^3) }
itransform = function(x) { return(x^(1/3)) }
## And the PPP method
ppp = PPPFunctionLink$new( bc_method = CDFt , transform = transform ,
itransform = itransform )
## 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.