dpkb {QuadratiK} | R Documentation |
The Poisson kernel-based Distribution (PKBD)
Description
Density function and random number generation from the Poisson kernel-based
Distribution with mean direction vector mu
and concentration parameter
rho
.
Usage
dpkb(x, mu, rho, logdens = FALSE)
rpkb(
n,
mu,
rho,
method = "rejvmf",
tol.eps = .Machine$double.eps^0.25,
max.iter = 1000
)
Arguments
x |
Matrix (or data.frame) with number of columns >=2. |
mu |
location vector parameter with length indicating the dimension of generated points. |
rho |
is the concentration parameter, with 0 <= rho < 1. |
logdens |
Logical; if 'TRUE', densities d are given as log(d). |
n |
number of observations. |
method |
string that indicates the method used for sampling observations. The available methods are
|
tol.eps |
the desired accuracy of convergence tolerance (for 'rejacg' method). |
max.iter |
the maximum number of iterations (for 'rejacg' method). |
Details
If the chosen method is 'rejacg', the function uniroot
, from the
stat
package, is used to estimate the beta parameter. In this case,
the complete results are provided as output.
Value
dpkb
gives the density value.
rpkb
generates random observations from the PKBD.
The number of observations generated is determined by n
for
rpkb
. This function returns a list with the matrix of generated
observations x
, the number of tries numTries
and the number of
acceptances numAccepted
.
References
Golzy, M., Markatou, M. (2020) Poisson Kernel-Based Clustering on the Sphere: Convergence Properties, Identifiability, and a Method of Sampling, Journal of Computational and Graphical Statistics, 29:4, 758-770, DOI: 10.1080/10618600.2020.1740713.
Sablica L., Hornik K., Leydold J. (2023) "Efficient sampling from the PKBD distribution", Electronic Journal of Statistics, 17(2), 2180-2209.
Examples
# Generate some data from pkbd density
pkbd_dat <- rpkb(10, c(0.5,0), 0.5)
# Calculate the PKBD density values
dens_val <- dpkb(pkbd_dat$x, c(0.5,0.5),0.5)