isValid | R Documentation |
Check whether parameter choices produce a valid g-and-k or g-and-h distribution.
isValid(
g,
k_or_h,
c = 0.8,
model = c("gk", "generalised_gh", "tukey_gh", "gh"),
initial_z = seq(-1, 1, 0.2)
)
g |
Vector of g parameters. |
k_or_h |
Vector of k or h parameters. |
c |
Vector of c parameters. |
model |
Which model to check: "gk", "generalised_gh" or "tukey_gh". For backwards compatibility, "gh" acts the same as "generalised_gh". |
initial_z |
Vector of initial z values to use in each optimisation. |
This function tests whether parameter choices provide a valid distribution.
Only g k and c parameters need be supplied as A and B>0 have no effect.
The function operates by numerically minimising the derivative of the quantile function,
and returning TRUE
if the minimum is positive.
It is possible that a local minimum is found, so it is recommended to use multiple optimisation starting points, and to beware that false positive may still result!
Logical vector denoting whether each parameter combination is valid.
isValid(0:10, -0.5)
isValid(0:10, 0.5, c=0.9, model="generalised_gh")
isValid(0:10, 0.5, model="tukey_gh")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.