| rmcd | R Documentation |
Produces one or more samples from the multivariate (p variables) Cauchy distribution (MCD)
with location parameter mu and scatter matrix Sigma.
rmcd(n, mu, Sigma, tol = 1e-6)
n |
integer. Number of observations. |
mu |
length |
Sigma |
symmetric, positive-definite square matrix of order |
tol |
tolerance for numerical lack of positive-definiteness in Sigma (for |
A sample from a MCD with parameters \boldsymbol{\mu} and \Sigma
can be generated using:
\displaystyle{\mathbf{X} = \boldsymbol{\mu} + \frac{\mathbf{Y}}{\sqrt{u}}}
where \mathbf{Y} is a random vector distributed among a centered Gaussian density
with covariance matrix \Sigma (generated using mvrnorm)
and u is distributed among a Chi-squared distribution with 1 degree of freedom.
A matrix with p columns and n rows.
Pierre Santagostini, Nizar Bouhlel
dmcd: probability density of a MCD.
mu <- c(0, 1, 4)
sigma <- matrix(c(1, 0.6, 0.2, 0.6, 1, 0.3, 0.2, 0.3, 1), nrow = 3)
x <- rmcd(100, mu, sigma)
x
apply(x, 2, median)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.