ppPlot: Probability Plots for various distributions

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

ppPlot creates a Probability plot of the values in x including a line.

Usage

1
2
3
ppPlot(x, distribution,  confbounds = TRUE, alpha, probs, main, xlab, ylab, 
       xlim, ylim, border = "red", bounds.col = "black", bounds.lty = 1, 
       grid = TRUE, box = TRUE, stats = TRUE, start, ...)

Arguments

x

vector containing the sample for ppPlot.

distribution

character string specifying the distribution of x. The function ppPlot will support the following character strings for distribution:

  • “beta”

  • “cauchy”

  • “chi-squared”

  • “exponential”

  • “f”

  • “gamma”

  • “geometric”

  • “log-normal”

  • “lognormal”

  • “logistic”

  • “negative binomial”

  • “normal”

  • “Poisson”

  • “t”

  • “weibull”

By default distribution is set to “normal”.

confbounds

boolean value: ‘TRUE’ if confidence bounds should be drawn (default value).

alpha

significance level for the confidence bounds, set on ‘0.05’ by default.

probs

vector containing the percentages for the y axis. All the values need to be between ‘0’ and ‘1’
If probs is missing it will be calculated internally.

main

an overall title for the plot: see title.

xlab

a title for the x axis: title.

ylab

a title for the y axis: title.

xlim

vector giving the range of the x-axis.

ylim

vector giving the range of the y-axis.

border

numerical value or single character string giving the color of interpolation line.
By default border is set to “red”.

bounds.col

numerical value or single character string giving the color of confidence bounds lines.
By default bounds is set to “black”.

bounds.lty

numerical value giving the color of confidence bounds lines.
By default bounds is set to ‘1’.

grid

logical value, deciding whether a grid will be added to the current plot.
By default grid is set to ‘TRUE’.

box

logical value, deciding whether a box is drawn to around the current plot.
By default box is set to ‘TRUE’.

stats

logical value deciding whether ppPlot returns the values listed under value.
By default stats is set to ‘TRUE’.

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).

Details

Distribution fitting is deligated to function fitdistr of the R-package MASS.
For computation of the confidence bounds the variance of the quantiles is estimated using the delta method,
which implies estimation of observed Fisher Information matrix as well as the gradient of the CDF of the fitted distribution.
Where possible, those values are replaced by their normal approximation.

Value

ppPlot returns a list containing the following:
x - x coordinates
y - y coordinates
int - Intercept
slope - slope

Note

For an example in context which shows the usage of the function ppPlot() please read the vignette for the package qualityTools at http://www.r-qualitytools.org/html/Analyze.html.

Author(s)

Thomas Roth thomas.roth@tu-berlin.de

See Also

qqPlot fitdistr in R-package MASS
http://www.r-qualitytools.org/html/Analyze.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#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")        

qualityTools documentation built on May 2, 2019, 10:21 a.m.