Description Usage Arguments Value References See Also Examples
This function calculates the theoretical mean, standard deviation, skewness,
standardized kurtosis, and standardized fifth and sixth cumulants given either a Distribution name (plus up to 4
parameters) or a pdf (with specified lower and upper support bounds). The result can be used as input to
find_constants or for data simulation.
Note: Due to the nature of the integration involved in calculating the standardized cumulants, the results are
approximations. Greater accuracy can be achieved by increasing the number of subdivisions (sub) used in the integration
process. However, the user may need to round the cumulants (i.e. using round(x, 8)) before using them in other functions
(i.e. find_constants, calc_lower_skurt, nonnormvar1, rcorrvar, rcorrvar2) in order to achieve
the desired results. For example, in order to ensure that skew is exactly 0 for symmetric distributions.
1 2 3 4 5 6 7 8 | calc_theory(Dist = c("Benini", "Beta", "Beta-Normal", "Birnbaum-Saunders",
"Chisq", "Dagum", "Exponential", "Exp-Geometric", "Exp-Logarithmic",
"Exp-Poisson", "F", "Fisk", "Frechet", "Gamma", "Gaussian", "Gompertz",
"Gumbel", "Kumaraswamy", "Laplace", "Lindley", "Logistic", "Loggamma",
"Lognormal", "Lomax", "Makeham", "Maxwell", "Nakagami", "Paralogistic",
"Pareto", "Perks", "Rayleigh", "Rice", "Singh-Maddala", "Skewnormal", "t",
"Topp-Leone", "Triangular", "Uniform", "Weibull"), params = NULL,
fx = NULL, lower = NULL, upper = NULL, sub = 1000)
|
Dist |
name of the distribution. The possible values are: "Benini", "Beta", "Beta-Normal", "Birnbaum-Saunders", "Chisq",
"Exponential", "Exp-Geometric", "Exp-Logarithmic", "Exp-Poisson", "F", "Fisk", "Frechet", "Gamma", "Gaussian", "Gompertz",
"Gumbel", "Kumaraswamy", "Laplace", "Lindley", "Logistic", "Loggamma", "Lognormal", "Lomax", "Makeham", "Maxwell",
"Nakagami", "Paralogistic", "Pareto", "Perks", "Rayleigh", "Rice", "Singh-Maddala", "Skewnormal", "t", "Topp-Leone", "Triangular",
"Uniform", "Weibull".
Please refer to the documentation for each package (either |
params |
a vector of parameters (up to 4) for the desired distribution (keep NULL if |
fx |
a pdf input as a function of x only, i.e. fx <- function(x) 0.5*(x-1)^2; must return a scalar (keep NULL if Dist supplied instead) |
lower |
the lower support bound for a supplied fx, else keep NULL |
upper |
the upper support bound for a supplied fx, else keep NULL |
sub |
the number of subdivisions to use in the integration; if no result, try increasing sub (requires longer computation time) |
A vector of the mean, standard deviation, skewness, standardized kurtosis, and standardized fifth and sixth cumulants
Headrick TC (2002). Fast Fifth-order Polynomial Transforms for Generating Univariate and Multivariate Non-normal Distributions. Computational Statistics & Data Analysis, 40(4):685-711. doi: 10.1016/S0167-9473(02)00072-5. (ScienceDirect)
Headrick TC, Kowalchuk RK (2007). The Power Method Transformation: Its Probability Density Function, Distribution Function, and Its Further Use for Fitting Data. Journal of Statistical Computation and Simulation, 77, 229-249. doi: 10.1080/10629360600605065.
Headrick TC, Sheng Y, & Hodis FA (2007). Numerical Computing and Graphics for the Power Method Transformation Using Mathematica. Journal of Statistical Software, 19(3), 1 - 17. doi: 10.18637/jss.v019.i03
Thomas W. Yee (2018). VGAM: Vector Generalized Linear and Additive Models. R package version 1.0-5. https://CRAN.R-project.org/package=VGAM
Rob Carnell (2017). triangle: Provides the Standard Distribution Functions for the Triangle Distribution. R package version 0.11. https://CRAN.R-project.org/package=triangle
calc_fisherk, calc_moments,
find_constants
1 2 3 4 5 6 7 8 9 10 11 12 13 | options(scipen = 999)
# Pareto Distribution: params = c(alpha = scale, theta = shape)
calc_theory(Dist = "Pareto", params = c(1, 10))
# Generalized Rayleigh Distribution: params = c(alpha = scale, mu/sqrt(pi/2) = shape)
calc_theory(Dist = "Rayleigh", params = c(0.5, 1))
# Laplace Distribution: params = c(location, scale)
calc_theory(Dist = "Laplace", params = c(0, 1))
# Triangle Distribution: params = c(a, b)
calc_theory(Dist = "Triangular", params = c(0, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.