Description Usage Arguments Value Examples
The function transforms vectors as the prediction or confidence intervals naively back to the original scale of the used transformation in trafo_lm.
1 | trafo_back(object, prediction)
|
object |
an object of type |
prediction |
the return of the predict.lm method. |
The backtransformed prediction.
1 2 3 4 5 6 7 8 9 10 11 12 | # Load data
data("cars", package = "datasets")
# Fit linear model
lm_cars <- lm(dist ~ speed, data = cars)
# Compare untransformed and transformed model
trafo_cars <- trafo_lm(object = lm_cars, trafo = "bickeldoksum", method = "skew",
lambdarange = c(1e-11, 2))
# Back-transform prediction and confidence interval
trafo_back(trafo_cars, predict(trafo_cars$trafo_mod, interval = "confidence"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.