Description Usage Arguments Details Value Examples
Calculate the arc length for a univariate four-parameter kappa cumulative distribution function over a specified interval.
1 2 3 |
mu |
A real number specifying the location parameter. |
sigma |
A positive real number specifying the scale parameter. |
h, k |
Real numbers specifying the two shape parameters. |
tau |
A real number between 0 and 1, corresponding to the CDF value at the point of truncation. |
q1 |
The point (or vector for |
q2 |
The point (or vector for |
quantile |
Logical, TRUE/FALSE, whether |
The arc length of a univariate four-parameter kappa cumulative distribution function is approximated using the numerical integration C code implimented for R's integrate functions, i.e. using Rdqags. For this approximation, subdiv = 100 (100 subdivisions), and eps_abs = eps_rel = 1e-10, i.e. the absolute and relative errors respectively.
kappa4Int: A list with the following components:
value: The resultant arc length.
abs.err: The absolute error between iterations. subdivisions: Number of subdivisions used in the numerical approximation.
neval: Number of function evaluations used by the numerical approximation.
kappa4Int2: A vector having length equal to that of the vector of lower quantile bounds, containing the arc lengths requested for a four-parameter kappa cumulative distribution function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(alR)
mu <- 4
sigma <- 0.4
h <- -4
tau <- 1 ## no truncation
k <- kappa4tc(-4, 0, 1)$par
kappa4Int(mu, sigma, h, k, tau, 0.025, 0.975, TRUE)
p1 <- qkappa4(0.025, mu, sigma, h, k)
p2 <- qkappa4(0.975, mu, sigma, h, k)
kappa4Int(mu, sigma, h, k, tau, p1, p2, FALSE)
kappa4Int2(mu, sigma, h, k, tau, c(0.025, 0.5), c(0.5, 0.975), TRUE)
p12 <- qkappa4(0.5, mu, sigma, h, k)
kappa4Int2(mu, sigma, h, k, tau, c(p1, p12), c(p12, p2), FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.