predict_functions: Predict functions for Johnson Transformation

Description Usage Arguments Details Value Examples

Description

Generic functions to apply the fitted Johnson transformation to transform new data.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'sb'
predict(object, newdata, ...)

## S3 method for class 'su'
predict(object, newdata, ...)

## S3 method for class 'sl'
predict(object, newdata, ...)

Arguments

object

a jtrans object with a specific type

newdata

new data to be fitted

...

further arguments to match predict

Details

After the johnson transformation is used, if you want to use the same transformation on different data, you can use these functions. This is designed to be the same functionality as the predict functions.

Value

Numeric vector of the transformed values

#'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#' # if you want to predict based on a fitted distribution, you must set the
# parameters in the qtls() function using the fitted model object jt.

jt <- jtrans(rexp(300, .4))

# good prediction
predict(jt, rexp(10, .4))

# will generate NaN because newx is from different distribution
predict(jt, rexp(10, .1))

wangyuchen/jtrans documentation built on May 4, 2019, 12:58 a.m.