dmsn                   package:sn                   R Documentation

_M_u_l_t_i_v_a_r_i_a_t_e _s_k_e_w-_n_o_r_m_a_l _d_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Probability density function, distribution function and random
     number  generation for the multivariate skew-normal (MSN)
     distribution.

_U_s_a_g_e:

     dmsn(x, xi=rep(0,d), Omega, alpha)
     pmsn(x, xi=rep(0,d), Omega, alpha, ...)
     rmsn(n=1, xi=rep(0,d), Omega, alpha)

_A_r_g_u_m_e_n_t_s:

       x: for `dmsn', this is either a vector of length `d' or a matrix
           with `d' columns, where `d' is `length(alpha)', giving  the
          coordinates of the point(s) where the density must be
          avaluated; for `pmsn', only a vector of length `d' is
          allowed. 

   Omega: a postive-definite covariance matrix of dimension `(d,d)'. 

   alpha: a numeric vector which regulates the shape of the density. 

      xi: a numeric vector of lenght `d', or a matrix with `d' columns,
          representing the location parameter of the distribution. If
          `xi' is a matrix, its dimensions must agree with those of
          `x'. 

       n: a numeric value which represents the number of random vectors
          to be drawn. 

     ...: additional parameters passed to `pmvnorm' 

_D_e_t_a_i_l_s:

     The positive-definiteness of `Omega' is not tested for efficiency
     reasons. Function `pmsn' requires  `pmvnorm' from
     `library(mvtnorm)'; the accuracy of its computation can be
     controlled via use of `...'

_V_a_l_u_e:

     A vector of density values (`dmsn'), or a single probability 
     (`pmsn') or a matrix of random  points (`rmsn').

_B_a_c_k_g_r_o_u_n_d:

     The multivariate skew-normal distribution is discussed by Azzalini
     and Dalla Valle (1996); the `(Omega,alpha)' parametrization
     adopted here is the one of Azzalini and Capitanio (1999).

_R_e_f_e_r_e_n_c_e_s:

     Azzalini, A. and Dalla Valle, A. (1996). The multivariate
     skew-normal distribution. Biometrika 83, 715-726.

     Azzalini, A. and Capitanio, A. (1999). Statistical applications of
     the multivariate skew-normal distribution. J.Roy.Statist.Soc. B
     61, 579-602.

_S_e_e _A_l_s_o:

     `dsn', `msn.fit', `dmst', `pmvnorm'

_E_x_a_m_p_l_e_s:

     x <- seq(-3,3,length=15)
     xi <- c(0.5, -1)
     Omega <- diag(2)
     Omega[2,1] <- Omega[1,2] <- 0.5
     alpha <- c(2,2)
     pdf <- dmsn(cbind(x,2*x-1), xi, Omega, alpha)
     rnd <- rmsn(10,  xi, Omega, alpha)
     library(mvtnorm)                        # only once in the session
     cdf <- pmsn(c(2,1), xi, Omega, alpha)

