pdplot2.Rd
`pdplot2` visualizes probability density (mass) and cumulative distribution functions in R. It requires parameters correctly specified for each distribution.
pdplot2(x, mean, sd, size, prob, rate, lambda, location, scale, shape,
shape1, shape2, df, df1, df2, meanlog, sdlog, min, max, m, n, k,
dist = c("normal", "binomial", "exponential", "poisson", "chi-square",
"logistic", "cauchy", "beta", "gamma", "geometric", "Student's t","F",
"weibull", "negative binomial", "log-normal", "uniform", "hypergeometric"),
type = c("PDF", "CDF"),
show_color = FALSE,
linetype = ...,
color = ...)
Vector of quantiles
Vector of means.
Vector of standard deviations.
Location parameter.
Scale parameter.
Number of trials (zero or more).
Probability of success on each trial.
Degrees of freedom (non-negative, but can be non-integer).
Degrees of freedom. Inf
allowed.
Vector of (non-negative) means.
Vector of rates.
Shape parameter.
Non-negative parameters of the Beta distribution.
Mean and standard deviation of the distribution on the log scale
Lower and upper limits of the distribution
The number of white balls in the urn, number of black balls in the urn, the number of balls drawn from the urn
Probability distribution. The supported distributions are "normal", "binomial", "exponential", "poisson", "chi-square", "logistic", "cauchy", "beta", "gamma", "geometric", "Student's t","F", "weibull", "negative binomial", "log-normal", "uniform", "hypergeometric".
Probability density or cumulative distribution functions.
If TRUE, pdplot2 uses colors for different distributions. Default is FALSE.
A character vector of linetypes. Default line types are c("solid", "dashed", "dotted", "dotdash", "longdash", twodash", "1F", "F1", "4C88C488", "12345678").
A character vector of colors. Default colors are c("#FF0000", "#00A08A", "#F2AD00", "#F98400", "#5BBCD6", "#ECCBAE", "#046C9A", "#D69C4E", "#ABDDDE", "#000000").
H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.
Karthik Ram and Hadley Wickham (2018). wesanderson: A Wes Anderson Palette Generator. R package version 0.3.6. https://CRAN.R-project.org/package=wesanderson
R Core Team (2020). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.
This function uses only the probability density/mass and cumulative distribution functions in base R (stats package). It also requires ggplot2 package.