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 |
mu |
a numeric vector representing the location parameter of the
distribution; it must be of length |
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 |
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
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)