O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating the test data

Install the packages if needed:

install.packages("car") install.packages("MASS")  

Assign the libraries:

library(car) library(MASS)  

Generate the skewed data:

set.seed(1010) x<-rexp(1000)        # exponential sample with parameter 1  par(mfrow=c(2,3))  

Plot the histogram and normal probability plots. The par() function specified that they will be part of the first row of plots shown in the next section:

hist(x) qqnorm(x)                  # Normal probability plot for original variable 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required