loglcsn {csn}R Documentation

The log-likelihood function

Description

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

Usage

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

See Also

pmvnorm, dmvnorm

Examples

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)

[Package csn version 1.1.3 Index]