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))
|
Attaching package: 'SimMultiCorrData'
The following object is masked from 'package:stats':
poly
mean sd skew kurtosis fifth sixth
1.111111 0.124226 2.811057 14.828571 130.208155 1808.899592
mean sd skew kurtosis fifth sixth
0.4431135 0.2316257 0.6311107 0.2450893 -0.3131373 -0.8682880
mean sd skew kurtosis fifth sixth
0.000000 1.414214 0.000000 3.000000 0.000000 30.000000
mean sd
0.50000000000000000000000 0.20412414523193150861502
skew kurtosis
-0.00000000000000001197557 -0.59999670963988416261259
fifth sixth
0.00000000000000013794433 1.71423587705926649960020
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.