Description Usage Arguments Examples
ppcc()
takes a vector of data x
and finds correlation coefficients between x
and a guessed distribution for several different shape values. The function ppcc()
returns a plot of the correlation coefficients against the shape parameters and return the highest correlation and the best estimated shape parameter. The supported distributions are: Weibull, Normal, Log-Normal, Poisson and Exponential.
1 | ppcc(x, distribution = "weibull", minshape = 1, maxshape = 10, steps1 = 30, steps2 = 30, plots = FALSE, brks = 70, bandw = "nrd0", returncor = FALSE))
|
x |
The datavector to be analyzed. |
distribution |
The guessed distribution. Supported distributions are: Weibull, Normal, Log-Normal, Poisson and Exponential. Default is set so Weibull. |
minshape |
The minimum shape value to use. Default set to 1. |
maxhsape |
Tha maximum shape value to use. Default set to 10. |
steps1 |
The total number of correlation coefficients to calculate between |
steps2 |
The same as |
plots |
If set to |
brks |
The number of breaks in the histogram, which is returned when |
bandw |
The smoothing bandwidth which |
returncor |
If set to |
1 2 3 4 5 6 7 8 9 10 11 | # Simulate a Weibull distributed dataset:
x = rweibull(1000, 2)
# Use the ppcc() function to find the best shape parameter:
ppcc(x)
# Simulate a Poisson distributed dataset:
x = rpois(1000, 3)
# Use th ppcc() function to estimate the best lambda:
ppcc(x, distribution = "poisson")
# Get a histogram with the estimated density and the true density for the best estimated lambda:
ppcc(x, distribution = "poisson", plots = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.