| trafo_compare {trafo} | R Documentation |
Compares linear models with transformed dependent variable
Description
Function trafo_compare compares linear models where the dependent
variable is transformed by different transformations.
Usage
trafo_compare(object, trafos, std = FALSE)
Arguments
object |
an object of type lm |
trafos |
a list of two |
std |
logical. If |
Value
An object of class trafo_compare. Methods such as
diagnostics.trafo_compare, print.trafo_compare,
plot.trafo_compare and summary.trafo_compare can
be used for this class.
See Also
bickeldoksum, boxcox, dual,
glog, gpower, log,
logshiftopt, manly, modulus,
neglog, sqrtshift, yeojohnson
Examples
# Load data
data("cars", package = "datasets")
# Fit linear model
lm_cars <- lm(dist ~ speed, data = cars)
# Transform with Bickel-Doksum transformation
bd_trafo <- bickeldoksum(object = lm_cars, plotit = FALSE)
# Transform with Box-Cox transformation
bc_trafo <- boxcox(object = lm_cars, method = "skew", plotit = FALSE)
# Compare transformed models
trafo_compare(object = lm_cars, trafos = list(bd_trafo, bc_trafo))
[Package trafo version 1.0.1 Index]