Description Usage Arguments Value Examples
View source: R/diagnostics.compare_trafo.R
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.
1 2 | ## S3 method for class 'trafo_compare'
diagnostics(object, ...)
|
object |
an object of type |
... |
additional arguments that are not used in this method |
An object of class diagnostics.trafo_compare
. The method
print.diagnostics.trafo_compare
can be used for this class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.