Learn R Programming

SVDNF (version 0.1.10)

logLik.SVDNF: Extract Log-Likelihood for SVDNF and DNFOptim Objects

Description

Returns the log-likelihood value of the stochastic volatility model represented by object evaluated at the parameters given in the DNF function.

Usage

# S3 method for SVDNF
logLik(object, ...)

Value

The log-likelihood of the stochastic volatility model given by

object evaluated at the parameters given to the DNF function. For DNFOptim objects, this returns the log-likelihood at the MLE parameter values and the number of free parameters in the model.

Arguments

object

an object of class SVDNF or DNFOptim.

...

further arguments passed to or from other methods.

Examples

Run this code
set.seed(1)
# Generate 200 returns from the DuffiePanSingleton model
DuffiePanSingleton_mod <- dynamicsSVM(model = "DuffiePanSingleton") 
DuffiePanSingleton_sim <- modelSim(t = 200, dynamics = DuffiePanSingleton_mod) 

# Run DNF on the data
dnf_filter <- DNF(data = DuffiePanSingleton_sim$returns,
  dynamics = DuffiePanSingleton_mod) 

# Print log-likelihood evaluation.
logLik(dnf_filter)

Run the code above in your browser using DataLab