Get startedGet started for free

Multivariate skewed distributions

1. Multivariate skew distributions

Both the normal and t-distributions are designed to model symmetric distributions, but real data is often skewed. Let's discuss a few multivariate skew distributions.

2. Skew multivariate distribution: scatterplot

This scatterplot, for example, represents two measurements in flow cytometry data called side-scatter and forward-scatter, which are used to identify live cells from dead cells. The scatterplot shows that the ellipsoidal shape common to bivariate normal and t-distributions might not be present in this data.

3. Skew multivariate distribution: contour plot

Overlaying the empirical contour plot on top of the scatter plot makes it clear that the individual clusters do not have ellipsoidal-looking contours, and neither the bivariate normal nor the t-distribution will be a good fit. Instead, since the contours are skewed versions of the ellipses, we can use a bivariate skew-normal or skew-t to model the individual clusters.

4. Univariate skew-normal distribution

A general univariate skew-normal is denoted by SN xi, omega, and alpha, where xi and omega are the location and scale parameters and alpha is the skewness parameter. A simpler form of the skew-normal distribution is denoted by SN alpha, which sets the location and scale parameters to 0 and 1.

5. Range of univariate skew-normal distributions

Here we compare a range of skew-normal distributions for various alphas, in orange, with a standard normal in blue. Positive values of alpha skew the distribution to the right, and negative values of alpha skew the distribution to the left. When alpha is 0, the distribution is the same as the standard normal.

6. Multivariate skew-normal distribution

Let's generalize the univariate notation. For example, a three-dimensional multivariate-skew-normal density is defined using the location and skewness parameters xi and alpha of length three, and a three by three variance-covariance matrix Omega.

7. Bivariate skew-normal distribution contour plot

To illustrate the shape of a bivariate skew-normal density, we draw the contour plot. Any non-zero skewness parameter, alpha, will stretch the contours in different directions, making the contours non-elliptical.

8. Functions for skew-normal distribution

Similar to the multivariate normal, the sn library offers the functions rmsn(), dmsn(), and pmsn() to draw random samples, and calculate densities and probabilities of multivariate skew-normal distributions. These functions will need the extra skewness vector argument, alpha, along with the xi and Omega arguments for the location and variance-covariance matrix. Note that the use of dmsn() and pmsn() is comparable to dmvnorm() and pmvnorm().

9. Functions for skew-t distribution

For the skew-t distribution, the corresponding functions are rmst(), dmst(), and pmst(), where we also need to specify the degrees of freedom, nu.

10. Generating skew-normal samples

Here we see the code to generate 2000 samples from a skew-normal distribution with the specified location and scale parameters, and the skewness vector alpha given by 4, 30, and -5.

11. Simulation results

The diagonal plots clearly show the skewness of the individual dimensions. The non-ellipsoidal concentration of points, in the plots in the lower triangle, show that the observed data is skewed in more than one dimension.

12. Generating skew-t samples

If we want to generate skew-t samples from the same location and variance-covariance parameter with 4 degrees of freedom, we add the nu equals 4 argument.

13. Estimation of parameters from data

Unlike a normal distribution or a t-distribution, estimating the parameters of a skew-normal involves iterative calculations, as there is no explicit equation to calculate the parameters. One option is to use the msn dot mle() function to calculate the parameters of a skew-normal distribution.

14. Estimation of parameters from data

If we use the generated sample and the msn dot mle function with opt dot method equals BFGS, we get the estimates on the left. These are pretty close to the original parameters used to generate the data on the right.

15. Now let's do some exercises with skew-normal distributions!

Now let's try some skew-normal distribution examples.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.