plotmvd | R Documentation |
Plots the probability density of a multivariate distribution with 2 variables:
generalized Gaussian distribution (MGGD) with mean vector mu
, dispersion matrix Sigma
and shape parameter beta
Cauchy distribution (MCD) with location parameter mu
and scatter matrix Sigma
t
distribution (MTD) with location parameter mu
and scatter matrix Sigma
This function uses the plot3d.function
function.
plotmvd(mu, Sigma, beta = NULL, nu = NULL,
distribution = c("mggd", "mcd", "mtd"),
xlim = c(mu[1] + c(-10, 10)*Sigma[1, 1]),
ylim = c(mu[2] + c(-10, 10)*Sigma[2, 2]), n = 101,
xvals = NULL, yvals = NULL, xlab = "x", ylab = "y",
zlab = "f(x,y)", col = "gray", tol = 1e-6, ...)
mu |
length 2 numeric vector. |
Sigma |
symmetric, positive-definite square matrix of order 2. |
beta |
numeric. If |
nu |
numeric. If |
distribution |
the probability distribution. It can be |
xlim , ylim |
x-and y- limits. |
n |
A one or two element vector giving the number of steps in the x and y grid, passed to |
xvals , yvals |
The values at which to evaluate |
xlab , ylab , zlab |
The axis labels. |
col |
The color to use for the plot. See |
tol |
tolerance (relative to largest variance) for numerical lack of positive-definiteness in Sigma, for the estimation of the density. See |
... |
Additional arguments to pass to |
Returns invisibly the probability density function.
Pierre Santagostini, Nizar Bouhlel
E. Gomez, M. Gomez-Villegas, H. Marin. A Multivariate Generalization of the Power Exponential Family of Distribution. Commun. Statist. 1998, Theory Methods, col. 27, no. 23, p 589-600. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/03610929808832115")}
S. Kotz and Saralees Nadarajah (2004), Multivariate t
Distributions and Their Applications, Cambridge University Press.
contourmvd
: contour plot of a bivariate generalised Gaussian, Cauchy or t
density.
dmggd
: Probability density of a multivariate generalised Gaussian distribution.
dmcd
: Probability density of a multivariate Cauchy distribution.
dmtd
: Probability density of a multivariate t
distribution.
mu <- c(1, 4)
Sigma <- matrix(c(0.8, 0.2, 0.2, 0.2), nrow = 2)
# Bivariate generalised Gaussian distribution
beta <- 0.74
plotmvd(mu, Sigma, beta = beta, distribution = "mggd")
# Bivariate Cauchy distribution
plotmvd(mu, Sigma, distribution = "mcd")
# Bivariate t distribution
nu <- 2
plotmvd(mu, Sigma, nu = nu, distribution = "mtd")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.