Learn R Programming

EnviroPRA2 (version 1.0.1)

plot_fit_dist: Graphical representation of data fitting to a distribution

Description

A function to help assessing the distribution that best fit a data vector

Usage

plot_fit_dist(x, dist)

Value

Returns: Empirical and theoretical density plots, Empirical and theoretical CDFs, Q-Q plot, P-P plot

Arguments

x

A numeric vector of length at least one containing only finite values (values must be >= 0)

dist

Character vector indicating the distribution to be ploted:"norm", "lnorm", "geom", "exp", "pois", "cauchy", "logis", "weibull"

Author

F. Barrio-Parra

See Also

plotdist from Library (fitdstrplus)

Examples

Run this code

set.seed(123)
a <- rnorm(n = 100, mean = 10, sd = 1)
plot_fit_dist(a, "norm")

Run the code above in your browser using DataLab