neglog: Neg log transformation for linear models

Description Usage Arguments Value References Examples

View source: R/neglog.R

Description

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

Usage

1
neglog(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.

References

Whittaker J, Whitehead C, Somers M (2005). The neglog transformation and quantile regression for the analysis of a large credit scoring database. Journal of the Royal Statistical Society. Series C (Applied Statistics), 54(4), 863-878.

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 
neglog(object = lm_cars)

Example output

Registered S3 method overwritten by 'pryr':
  method      from
  print.bytes Rcpp
Neglog Transformation 

Summary of transformed variables 
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  1.099   3.296   3.611   3.578   4.043   4.796 

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

Related to neglog in trafo...