Learn R Programming

FitDynMix (version 1.0.2)

ddyn: Density of a Lognormal-GPD dynamic mixture

Description

This function evaluates the density of a Lognormal-GPD dynamic mixture, with Cauchy or exponential weight.

Usage

ddyn(x, pars, intTol, weight)

Value

density of the lognormal-GPD mixture evaluated at x.

Arguments

x

non-negative vector: points where the density is evaluated.

pars

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

intTol

non-negative scalar: threshold for stopping the computation of the integral in the normalization constant: if the integral on the interval from n-1 to n is smaller than intTol, the approximation procedure stops.

weight

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

Examples

Run this code
x <- seq(0,20,length.out=1000)
pars <- c(1,2,0,.5,.25,3.5)
dLNPar <- ddyn(x,pars,1e-04,'cau')

Run the code above in your browser using DataLab