Learn R Programming

ashr (version 1.0.12)

estimate_mixprop: estimate mixture proportions of sigmaa by EM algorithm

Usage

estimate_mixprop(betahat, sebetahat, g, prior, optmethod = c("mixEM", "mixVBEM", "cxxMixSquarem", "mixIP"), null.comp = 1, df = NULL, control = list())

Arguments

betahat
(n vector of observations)
sebetahat
(n vector of standard errors/deviations of observations)
g
the prior distribution for beta (usually estimated from the data
prior
string, or numeric vector indicating Dirichlet prior on mixture proportions (defaults to "uniform", or (1,1...,1); also can be "nullbiased" (nullweight,1,...,1) to put more weight on first component)
optmethod
name of function to use to do optimization
null.comp
the position of the null component
df
appropriate degrees of freedom for (t) distribution of betahat/sebetahat, default is NULL(Gaussian)
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).

Value

A list, including the final loglikelihood, the null loglikelihood, a n by k likelihoodmatrix with (j,k)th element equal to $f_k(x_j)$,and a flag to indicate convergence.