Learn R Programming

lognGPD (version 0.1.0)

EMlogngpdmix: Mixture estimation via EM

Description

This function estimates a static lognormal - generalized Pareto mixture by means of the EM algorithm. Optionally, bootstrap standard errors are computed via parallel computing.

Usage

EMlogngpdmix(x0, y, maxiter, nboot = 0)

Value

A list with the following elements is returned: "p" = estimated value of p, "post" = posterior probabilities of all observations, "mu" = estimated value of \(\mu\), "sigma " = estimated value of \(\sigma\), "xi" = estimated value of \(\xi\), "beta" = estimated value of \(\beta\), "loglik" = maximimzed log-likelihood, "nit" = number of iterations, bootEst = matrix of parameter estimates at each bootstrap replications (only if nboot > 0). bootStd = bootstrap standard errors of each parameter (only if nboot > 0).

Arguments

x0

numerical vector (5x1): initial values of the parameters p, \(\mu\), \(\sigma\), \(\xi\), \(\beta\).

y

vector: observed data.

maxiter

positive integer: maximum number of iterations of the EM algorithm.

nboot

positive integer: number of bootstrap replications for the computation of the standard errors (defaults to 0).

Examples

Run this code
y <- rlognGPD(100,.9,0,1,0.5,2)
x0 <- c(.7,.2,1.3,.8,1.7)
res <- EMlogngpdmix(x0, y, 1000)

Run the code above in your browser using DataLab