UBMM: Fit a mixture of uniform and Beta distribution

Description Usage Arguments Value Examples

Description

Fit a mixture of uniform and Beta distribution

Usage

1
2
UBMM(x, w = as.numeric(c()), a = as.numeric(c()), precision = 1e-08,
  MaxIter = 10000L)

Arguments

x

A vector of numeric values

w

A vector of two numeric values, representing the weights of the uniform and Beta distributions. Default values are 0.5, respectively.

a

Initial values of the alpha and beta for the Beta distribution. Defaults are obtained from MOM estimators.

precision

The tolerance for convergence. Default value is 1e-8.

MaxIter

The maximum iteration for the EM algorithm. Default value is 10000L.

Value

A list of three components, including the converged weight, parameters for Beta distribution, and the convergence iteration, respectively.

Examples

1
2
3
x0=runif(900) 
x1=rbeta(100,0.5,0.5)
UBMM(c(x0,x1),w=c(0.8,0.2),a=c(0.7,0.8))

chongma1989/tiltmod documentation built on May 7, 2019, 8:38 a.m.