The probability density function

Share:

Description

The probability density function of the closed-skew normal distribution

Usage

1
dcsn(x, mu, sigma, gamma, nu, delta)

Arguments

x

this is either a vector of length n or a matrix with n columns, where n=ncol(sigma), giving the coordinates of the point(s) where the density must be evaluated

mu

a numeric vector representing the location parameter of the distribution; it must be of length n, as defined above

sigma

a positive definite matrix representing the scale parameter of the distribution; a vector of length 1 is also allowed

gamma

a matrix representing the skewness parameter of the distribution; a vector of length 1 is also allowed

nu

a numeric vector allows for closure with conditional densities; it must be of length q, as defined above

delta

a positive definite matrix allows for closure with the marginal densities; a vector of length 1 is also allowed

Details

Function dcsn makes use of pmvnorm and dmvnorm from package mvtnorm

Value

dcsn returns a vector of density values

See Also

pmvnorm, dmvnorm

Examples

1
2
3
4
5
6
7
8
9
x1 <- seq(4.5,11,length=100)
x2 <- cbind(seq(3,9,length=100),seq(7,13,length=100))
mu <- c(5,7)
sigma <- matrix(c(1,0.2,0.2,4),2)
gamma <- matrix(c(4,0,0,5),2)
nu <- c(-2,6)
delta <- matrix(c(1,0,0,1),2)
f1 <- dcsn(x1,5,9,1,0,0.05)
f2 <- dcsn(x2, mu, sigma, gamma, nu, delta)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.