reciprocal: Reciprocal transformation for linear models

Description Usage Arguments Value Examples

View source: R/Reciprocal.R

Description

The function transforms the dependent variable of a linear model using the Reciprocal transformation.

Usage

1
reciprocal(object)

Arguments

object

an object of type lm.

Value

An object of class trafo. Methods such as as.data.frame.trafo and print.trafo can be used for this class.

Examples

1
2
3
4
5
6
7
8
# Load data
data("cars", package = "datasets")

# Fit linear model
lm_cars <- lm(dist ~ speed, data = cars)

# Transform dependent variable 
reciprocal(object = lm_cars)

akreutzmann/trafo documentation built on Sept. 14, 2020, 9:03 p.m.