fmbeg_em: EM algorithm function for the mixed bivariate distribution...

Description Usage Arguments Details Value References Examples

View source: R/mixbeg_EM.R

Description

This function computes the parameter estimates of FMBEG distribution using the EM algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fmbeg_em(
  data,
  beta = NULL,
  p = NULL,
  q = NULL,
  pi = NULL,
  m = 2,
  l = 1,
  maxiter = 1000,
  tol = 1e-08,
  verb = FALSE
)

Arguments

data

dataframe of bivariate random vector (X,N) BMEG distribution.

beta

numeric parameter vectors, which must be numeric greater than 0. Default value is NULL.

p

vector of numeric parameters between 0 and 1. Default value is NULL.

q

vector of gamma membership probabilities between 0 and 1, and sum equal to 1. Default value is NULL.

pi

vector of geometric membership probabilities between 0 and 1, and sum equal to 1. Default value is NULL.

m

number of gamma components. Default value is 2.

l

number of geometric components. Default value is 1.

maxiter

maximum number of iterations. Default value is 1000.

tol

tolerance value. Default value is 1e-08

verb

If TRUE, estimates are printed during each iteration.

Details

Takes initial guess for the parameters and the algorithm will estimate the MLE.

Value

list containing data frame parameter estimates, log-likelihood value and data frame of iteration

References

Amponsah, C. K. and Kozubowski, T.J., and Panorska, A.K. (2020). A Mixed bivariate distribution with mixture exponential and geometric marginals. Inprint.

Examples

1
2
3
data <- rfmbeg(10, beta = c(1,2,10), p=c(0.5,0.8), q=c(0.3,0.2,0.5), pi=c(0.6,0.4))
fit <- fmbeg_em(data=data, m=3,l=3)
fit$par

camponsah/BivMixDist documentation built on Nov. 15, 2021, 3:11 a.m.