diagnostics.trafo_compare {trafo} | R Documentation |
Diagnostics for two differently transformed models
Description
Returns information about the applied transformations and selected diagnostics to check model assumptions. Two models are compared where the dependent variable is transformed by different transformations.
Usage
## S3 method for class 'trafo_compare'
diagnostics(object, ...)
Arguments
object |
an object of type |
... |
additional arguments that are not used in this method |
Value
An object of class diagnostics.trafo_compare
. The method
print.diagnostics.trafo_compare
can be used for this class.
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
compare <- trafo_compare(object = lm_cars, trafos = list(bd_trafo, bc_trafo))
# Get diagnostics
diagnostics(compare)
[Package trafo version 1.0.1 Index]