diagnostics.trafo_compare: Diagnostics for two differently transformed models

Description Usage Arguments Value Examples

View source: R/diagnostics.compare_trafo.R

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

1
2
## S3 method for class 'trafo_compare'
diagnostics(object, ...)

Arguments

object

an object of type trafo_compare

...

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

 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)

trafo documentation built on May 2, 2019, 2:13 p.m.