Description Usage Arguments Details Value Author(s) References See Also Examples
Density and random generation functions for the multivariate Pearson Type VII (PVII) distribution.
1 2 |
x |
a numeric matrix of which each row represents an observation. |
mean |
a vector of mean parameters for the columns of |
scale |
a positive definite D-by-D matrix. |
shape |
a positive scalar. |
log |
logical; if |
n |
number of vectors to simulate. |
The multivariate PVII distribution, a generalization of the multivariate t-distribution, arises when the inverse of the covariance of a multivariate normal random variable is itself a random variable with the Wishart distribution. See Sun et al. (2010) for details. As parameterized here, the density of a multivariate PVII random variable with mean mu, scale Sigma, and shape alpha is
f(x) = (2 pi)^(-D/2) |Sigma|^(-1/2) gamma(alpha)^(-1) gamma(alpha + D/2) {1 + (1/2) t(x-mu) Sigma^(-1) (x-mu)}^(alpha + D/2)
where \dQuote(gamma) denotes the gamma function.
For dmvpvii
, a vector of densities. For rmvpvii
, a vector with n
rows and D columns representing a sample from the multivariate PVII distribution with the specified parameters.
Daniel Dvorkin
Sun, J., Kaban, A., and Garibaldi, J.M. (2010) Robust mixture clustering using Pearson Type VII distribution. Pattern Recognition Letters 31(16), 2447–2454.
pvii
for the univariate version; mvnorm
for a related distribution; thetahat
for parameter estimation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | set.seed(123)
mu <- -1:1
Sigma <- mleCov(matrix(rnorm(30), ncol=3))
Sigma
# [,1] [,2] [,3]
# [1,] 0.8187336 0.5147059 -0.3243663
# [2,] 0.5147059 0.9698367 -0.4933797
# [3,] -0.3243663 -0.4933797 0.7797652
alpha <- 2
x <- rmvpvii(5, mu, Sigma, alpha)
x
# [,1] [,2] [,3]
# [1,] -0.7774939 -0.5824543 2.139000
# [2,] -0.3941455 0.5651861 1.157972
# [3,] -0.3595201 0.2209538 0.588348
# [4,] -1.4053874 -0.5759132 1.055372
# [5,] -1.6673451 1.3083343 1.625087
dmvpvii(x, mu, Sigma, alpha)
# [1] 0.024770962 0.103843268 0.147672666 0.189416293 0.001638714
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.