The function transforms the dependent variable of a linear model using the Neg log transformation.
neglog(object)
Arguments
object: an object of type lm.
Returns
An object of class trafo. Methods such as as.data.frame.trafo and print.trafo can be used for this class.
Examples
# Load datadata("cars", package ="datasets")# Fit linear modellm_cars <- lm(dist ~ speed, data = cars)# Transform dependent variable neglog(object = lm_cars)
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.