Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mixVBEM

Estimate posterior distribution on mixture proportions of a mixture model by a Variational Bayes EM algorithm


Description

Given the individual component likelihoods for a mixture model, estimates the posterior on the mixture proportions by an VBEM algorithm. Used by the ash main function; there is no need for a user to call this function separately, but it is exported for convenience.

Usage

mixVBEM(matrix_lik, prior, pi_init = NULL, control = list())

Arguments

matrix_lik

a n by k matrix with (j,k)th element equal to f_k(x_j).

prior

a k vector of the parameters of the Dirichlet prior on π. Recommended to be rep(1,k)

pi_init

the initial value of the posterior parameters. If not specified defaults to the prior parameters.

control

A list of control parameters for the SQUAREM algorithm, default value is set to be control.default=list(K = 1, method=3, square=TRUE, step.min0=1, step.max0=1, mstep=4, kr=1, objfn.inc=1,tol=1.e-07, maxiter=5000, trace=FALSE).

Details

Fits a k component mixture model

f(x|π) = ∑_k π_k f_k(x)

to independent and identically distributed data x_1,…,x_n. Estimates posterior on mixture proportions π by Variational Bayes, with a Dirichlet prior on π. Algorithm adapted from Bishop (2009), Pattern Recognition and Machine Learning, Chapter 10.

Value

A list, whose components include point estimates (pihat), the parameters of the fitted posterior on π (pipost), the bound on the log likelihood for each iteration (B) and a flag to indicate convergence (converged).


ashr

Methods for Adaptive Shrinkage, using Empirical Bayes

v2.2-47
GPL (>= 3)
Authors
Matthew Stephens [aut], Peter Carbonetto [aut, cre], Chaoxing Dai [ctb], David Gerard [aut], Mengyin Lu [aut], Lei Sun [aut], Jason Willwerscheid [aut], Nan Xiao [aut], Mazon Zeng [ctb]
Initial release
2020-02-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.