Description Usage Arguments Value Examples
This function constructs a data-driven Uniform transformer to transform the distribution of x to a Uniform distribution, and returns the transformed data for the original data x and a new data newx.
1 | transformer(x,newx,marginal=FALSE,type='constant')
|
x |
A data matrix/vector to construct the Uniform transformer |
newx |
A new data matrix/vector to be transformed. |
marginal |
An indicator for whether the Uniform transformer is constructed based on the marginal distribution or joint distribution. By defaul, marginal is FALSE, i.e., the Uniform transformer is constructed based on the joint distribution of x. |
type |
Type of the smooth kernel function used to approximate the density of the covariates in the control group. type should be one of 'constant', 'linear' and 'quadratic'. |
xt |
Transformed data of x with the constructed Uniform transformer. |
newxt |
Transformed data of newx with the constructed Uniform transformer. |
1 2 3 | res=transformer(rnorm(100),rnorm(100,mean=0.5))
res$xt
res$newxt
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.