Description Usage Arguments Value Author(s) References Examples
Transform the response variable using the one-paremter, symmetric transformation of Geraci and Jones (2015).
1 | trans_parameter(x, parameter, inverse=FALSE)
|
x |
a vector of values to be transformed (the response variable) |
parameter |
a real-valued transformation parameter. 0 corresponds to the log transformation and 1 corresponds to the identity. See Geraci and Jones (2015) for more information on the one-parameter, symmetric transformation. |
inverse |
If TRUE, the inverse transformation is done to transform the variable back to the original scale. If FALSE, the standard transformation is computed. |
Returns a vector of the transformed (or back-transformed) variable.
Adam Maidman
Geraci, M. and Jones, M. (2015). Improved transformation-based quantile regression. Canadian Journal of Statistics 43, 118-132.
Maidman, A., Wang, L. (2017). New Semiparametric Method for Predicting High-Cost Patients. Preprint.
1 2 3 4 5 6 7 8 9 10 | data(simData)
simData$Y <- exp(simData$y)
tparam <- transform_plaqr(Y~x1+x2+x3, nonlinVars=~z1+z2, data=simData)
simData$newy <- trans_parameter(simData$Y, tparam$parameter)
fit <- plaqr(newy~x1+x2+x3, nonlinVars=~z1+z2, data=simData)
trans_parameter( predictInt(fit), tparam$parameter, inverse=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.