Learn R Programming

qualityTools (version 1.31.1)

ppPlot: Probability Plots for various distributions

Description

ppPlot creates a Probability plot of the values in x including a line. Supported distributions are beta", "cauchy", "chi-squared", "exponential", "f", "gamma", "geometric", "log-normal", "lognormal", "logistic", "negative binomial", "normal", "Poisson", "t" and "weibull".

Usage

ppPlot(x, distribution, probs, main, xlab, ylab, xlim, ylim, grid = TRUE, box = TRUE, stats = TRUE, start, ...)

Arguments

x
the sample for ppPlot
distribution
a character specifying the distribution for the Probability plot
probs
percentages for the y axis
main
graphical parameter
xlab
graphical parameter
ylab
graphical parameter
xlim
graphical parameter
ylim
graphical parameter
grid
add a grid to the current plot
box
stats
start
A named list giving the parameters to be fitted with initial values. Must be supplied for some distribution. (see Details)
...
further graphical parameters (see par)

Value

  • a list
  • xcoordinates
  • ycoordinates
  • intIntercept
  • slopeslope

Details

Distribution fitting is deligated to function fitdistr of the R-package MASS

See Also

fitdistr in R-package MASS~

Examples

Run this code
#set up the plotting window for 6 plots
par(mfrow = c(3,2))

#generate random data from weibull distribution
x = rweibull(20, 8, 2)

#Probability Plot for different distributions
ppPlot(x, "log-normal")
ppPlot(x, "normal")
ppPlot(x, "exponential", DB = TRUE)
ppPlot(x, "cauchy")
ppPlot(x, "weibull")
ppPlot(x, "logistic")

Run the code above in your browser using DataLab