to.logLik {HAC} | R Documentation |
log-likelihood
Description
to.logLik
returns either the log-likehood function depending on a vector theta
for a given sample X
or the value of the log-likelihood, if eval = TRUE
.
Usage
to.logLik(X, hac, eval = FALSE, margins = NULL, sum.log = TRUE,
na.rm = FALSE, ...)
Arguments
X |
a data matrix. The number of columns and the corresponding names have to coincide with the specifications of the copula model |
hac |
an object of the class |
eval |
boolean. If |
margins |
specifies the margins. The data matrix |
sum.log |
boolean. If |
na.rm |
boolean. If |
... |
arguments to be passed to |
See Also
Examples
# construct a hac-model
tree = list(list("X1", "X5", 3), list("X2", "X3", "X4", 4), 2)
model = hac(type = 1, tree = tree)
# sample from copula model
sample = rHAC(1000, model)
# check the accurancy of the estimation procedure
ll = to.logLik(sample, model)
ll.value = to.logLik(sample, model, eval = TRUE)
ll(c(2, 3, 4)) == ll.value # [1] TRUE