nlTransform
performs Neglog transformation for normality of a variable and provides graphical analysis.
nlTransform(data, plot = TRUE, alpha = 0.05, verbose = TRUE)
A list with class "nl" containing the following elements:
method name
Shapiro-Wilk test statistic for transformed data
Shapiro-Wilk test p.value for transformed data
level of significance to assess normality
transformed data set
variable name
a numeric vector of data values.
a logical to plot histogram with its density line and qqplot of raw and transformed data. Defaults plot = TRUE.
the level of significance to check the normality after transformation. Default is set to alpha = 0.05.
a logical for printing output to R console.
Muge Coskun Yildirim, Osman Dag
Denote
Asar, O., Ilk, O., Dag, O. (2017). Estimating Box-Cox Power Transformation Parameter via Goodness of Fit Tests. Communications in Statistics - Simulation and Computation, 46:1, 91--105.
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:5, 863--78.
data <- cars$dist
library(Transform)
out <- nlTransform(data)
out$p.value # p.value of Shapiro-Wilk test for transformed data
out$tf.data # transformed data set
Run the code above in your browser using DataLab