# loglcsn: The log-likelihood function In csn: Closed Skew-Normal Distribution

## Description

The log-likelihood function of the closed-skew normal distribution

## Usage

 `1` ```loglcsn(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 loglcsn makes use of pmvnorm and dmvnorm from package mvtnorm

## Value

`loglcsn` returns a sum of log-transformed density values

`pmvnorm`, `dmvnorm`
 ```1 2 3 4 5 6 7``` ```x <- 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) L <- loglcsn(x, mu, sigma, gamma, nu, delta) ```