Multivariate Probability Distributions in R
Surajit Ray
Reader, University of Glasgow
Flow cytometry data -- side scatter (SSC) and forward scatter (FSC)
Flow cytometry data -- side scatter (SSC) and forward scatter (FSC)
General skew-normal is denoted by $SN(\xi,\omega,\alpha)$
Simplest form: $z \sim SN(\alpha) $
Comparing $SN(\alpha)$ to a standard Normal
Notations: three-dimensional multivariate skew-normal distribution
$SN(\xi,\Omega,\alpha)$
Bivariate skew-normal
${\xi}={\begin{pmatrix} 1 \\ 2 \end{pmatrix}},\quad { \Omega }={\begin{pmatrix} 1 & 0.5 \\ 0.5 & 2 \end{pmatrix}}$, ${\alpha}={\begin{pmatrix} -3 \\ 3 \end{pmatrix}}$.
From sn
library:
dmsn(x, xi, Omega, alpha)
pmsn(x, xi, Omega, alpha)
rmsn(n, xi, Omega, alpha)
xi
, Omega
, alpha
From sn
library:
dmst(x, xi, Omega, alpha, nu)
pmst(x, xi, Omega, alpha, nu)
rmst(n, xi, Omega, alpha, nu )
xi
, Omega
, alpha
, nu
(degrees of freedom)Generate 2000 samples from 3 dimensional skew-normal
$ SN\left(\xi= \begin{pmatrix} 1 \\ 2 \\ -5 \end{pmatrix} , \Omega={\begin{pmatrix} 1 & 1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & 5 \end{pmatrix}}, \alpha=\begin{pmatrix} 4 \\ 30 \\ -5 \end{pmatrix} \right)$
# Specify xi, Omega and alpha
xi1 <- c(1, 2, -5)
Omega1 <- matrix(c(1, 1, 0,
1, 2, 0,
0, 0, 5), 3, 3)
alpha1 <- c(4, 30, -5)
# Generate samples
skew.sample <- rmsn(n = 2000, xi = xi1, Omega = Omega1, alpha = alpha1)
Sample from skew-normal distribution
Generate 2000 samples from 3 dimensional skew-t with
$\xi= \begin{pmatrix} 1 \\ 2 \\ -5 \end{pmatrix} , \Omega={\begin{pmatrix} 1 & 1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & 5 \end{pmatrix}}, \alpha=\begin{pmatrix} 4 \\ 30 \\ -5 \end{pmatrix}, df = 4$
# Generate samples
skewt.sample <- rmst(n = 2000, xi = xi1, Omega = Omega1, alpha = alpha1, nu = 4)
Need iterative algorithm to estimate the parameters of a skew-normal distribution
Several functions in sn
package, including msn.mle()
function
msn.mle(y = skew.sample, opt.method = "BFGS")
$dp
$dp$beta
X1 X2 X3
[1,] 1.024 2.021 -4.81
$dp$Omega
X1 X2 X3
X1 0.9154 0.8865 -0.1507
X2 0.8865 1.8276 -0.3560
X3 -0.1507 -0.3560 5.0352
$dp$alpha
X1 X2 X3
3.670 28.465 -5.029
Samples were generated using:
$\xi= \begin{pmatrix} 1 \\ 2 \\ -5 \end{pmatrix} , \Omega={\begin{pmatrix} 1 & 1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & 5 \end{pmatrix}}, \alpha=\begin{pmatrix} 4 \\ 30 \\ -5 \end{pmatrix} $
Multivariate Probability Distributions in R