gnk: Functions for g-and-k distribution

qgnkR Documentation

Functions for g-and-k distribution

Description

Functions for g-and-k distribution

Usage

qgnk(p, A, B, C = 0.8, g, k, zscale = FALSE)

fgnk(p, A, B, C = 0.8, g, k, log = FALSE, zscale = FALSE)

dqgnk(p, A, B, C = 0.8, g, k, log = FALSE, zscale = FALSE)

rgnk(n, A, B, C = 0.8, g, k)

pgnk(q, ..., lower = 0, upper = 1, tol = 1e-06, silent = TRUE, trace = 0)

is_gnk_valid(A, B, C = 0.8, g, k, n_grid = 100L, s_grid = 2L)

Arguments

p

numeric vector of probabilities

A

numeric location parameter of g-and-k distribution

B

positive numeric scale parameter of g-and-k distribution

C

numeric parameter of g-and-k distribution. Default is 0.8

g

numeric skeweness parameter of g-and-k distribution

k

non-negative numeric kurtosis parameter of g-and-k distribution

zscale

is the probability input provided on scale of z values, i.e. as z=qnorm(p). Default is FALSE

log

logical should the result be returned as log(). Default is FALSE

n

numeric number of samples to draw

q

vector of quantiles

...

used by method

lower, upper

the stats::uniroot lower and upper end points of the interval to be searched. Defaults are 0 and 1, respectively

tol

the stats::uniroot desired accuracy (convergence tolerance). Default value 1e-06

silent

the base::try argument. Default is TRUE

trace

integer number passed to stats::uniroot; if positive, tracing information is produced. Higher values giving more details.

n_grid

integer size of helper grid to be passed to make_pgrid. Default is 50

s_grid

integer beta shape of helper grid to be passed to make_pgrid. Default is 5

Value

vector of quantiles for g-and-k distribution

Examples

qgnk(0.1, 3,1,0.8, 2,0.5)
is_gnk_valid(A=5, B=5, C=0.8, g=0.5, k=-0.3) #FALSE
is_gnk_valid(A=5, B=5, C=0.8, g=0.5, k=-0.1) #TRUE

dmi3kno/qpd documentation built on Sept. 29, 2024, 6:39 p.m.