Learn R Programming

FitDynMix (version 1.0.2)

rDynMix: Simulating a dynamic lognormal-Pareto mixture

Description

This function simulates a dynamic mixture. Currently only implemented for the lognormal - generalized Pareto case, with Cauchy or exponential weight.

Usage

rDynMix(nreps, x, weight)

Value

ysim (nreps x 1) vector: nreps random numbers from the lognormal-GPD dynamic mixture.

Arguments

nreps

integer: number of observations sampled from the mixture.

x

numerical vector: if weight = 'cau', values of μc, \(\tau\), \(\mu\), \(\sigma\), \(\xi\), \(\beta\); if weight = 'exp', values of \(\lambda\), \(\mu\), \(\sigma\), \(\xi\), \(\beta\).

weight

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

Details

This function simulates a dynamic lognormal-GPD mixture using the algorithm of Frigessi et al. (2002, p. 221).

References

fri02FitDynMix

Examples

Run this code
ysim <- rDynMix(100,c(1,2,0,0.5,0.25,3),'cau')

Run the code above in your browser using DataLab