Learn R Programming

FitDynMix (version 1.0.2)

dynloglikMC: Log-likelihood of a Lognormal-GPD dynamic mixture

Description

This function evaluates the log-likelihood of a Lognormal-GPD dynamic mixture, with Cauchy or exponential weight, approximating the normalizing constant via Monte Carlo simulation.

Usage

dynloglikMC(x, y, nreps, xiInst, betaInst, weight)

Value

Log-likelihood of the lognormal-GPD mixture evaluated at y.

Arguments

x

if weight is equal to 'cau', (6 by 1) numerical vector: values of \(\mu_c\), \(\tau\), \(\mu\), \(\sigma\), \(\xi\), \(\beta\); if weight is equal to 'exp', (5 by 1) numerical vector: values of \(\lambda\), \(\mu\), \(\sigma\), \(\xi\), \(\beta\).

y

vector: points where the function is evaluated.

nreps

non-negative integer: number of replications to be used in the computation of the integral in the normalizing constant.

xiInst

non-negative real: shape parameter of the instrumental GPD.

betaInst

non-negative real: scale parameter of the instrumental GPD.

weight

'cau' or 'exp': name of weight distribution.

Examples

Run this code
llik <- dynloglikMC(c(1,2,0,1,.25,3.5),Metro2019,10000,3,3,'exp')

Run the code above in your browser using DataLab