fit_sqn | R Documentation |
Functions for fitting and sampling from sqn distribution
fit_sqn(p, q, tol = .Machine$double.eps^2)
approx_sqn(
q,
p = NULL,
thin = FALSE,
n_grid = 1000,
s_grid = 2L,
tol = .Machine$double.eps^2
)
is_sqn_valid(a, n_grid = 50L, s_grid = 2L)
p |
the vector of probability values the quantiles q correspond to. This would be specified if sqn is fitted to the empirical CDF. Default is NULL. |
q |
vector of quantile values (data) |
tol |
tolerance for solve() and qr.solve(), default is .Machine$double.eps^2 |
thin |
logical. Should original data be thinned. Default is FALSE. |
n_grid |
in case data thinning is performed, integer number of quantiles to extract from data, if data vector |
s_grid |
in case data thinning is performed, probability grid shape parameter passed to |
a |
vector of |
fit_sqn
is for fitting the sqn function to the set of QP values.
Number of sqn terms will match the number of QP pairs.
approx_sqn
is for approximating sqn function to the set of data.
is_sqn_valid
is a function for checking if the sqn is valid
p <- c(0.1, 0.5, 0.6, 0.9)
q <- c(4, 9, 10, 13)
a <- fit_sqn(p,q)
x <- rsqn(100, a)
approx_sqn(x)
a <- c(9, 1.8, -1.13, 9)
is_sqn_valid(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.