Calculates the density of the PKB distribution for given data points.
dpkb(y, mu, rho, log = FALSE)
A vector of density values (or log-density if log = TRUE) for each row in y.
A matrix or data frame where each row represents a data point on the unit hypersphere.
A vector or matrix representing the mean direction parameter(s).
If a vector, it must be normalized (unit length) and is applied to all data points.
If a matrix, it must have the same number of rows as y
, and each row must be normalized.
A scalar or a vector representing the concentration parameter.
If a vector, its length must match the number of rows in y
.
Each rho[i]
is used to evaluate the density for y[i, ]
.
Must be between 0 (inclusive) and 1 (exclusive).
Logical; if TRUE, the log-density is returned. Default is FALSE.
This function calculates the density of the PKB distribution for each data point in y, given the parameters mu and rho.
y <- matrix(c(1, 0, 0, 0, 0, 1), ncol = 3, byrow = TRUE)
mu <- c(1, 0, 0)
rho <- 0.5
dpkb(y, mu, rho)
Run the code above in your browser using DataLab