Usage
EMest(betahat, sebetahat, g, prior, null.comp = 1, nullcheck = TRUE, VB = FALSE, cxx = FALSE, 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; this is used primarily in simulated data to do computations with the "true" g)
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)
null.comp
the position of the null component
nullcheck
whether to check that any fitted model exceeds the "null" likelihood
in which all weight is on the first component
VB
whether to use Variational Bayes to estimate mixture proportions (instead of EM to find MAP estimate), see mixVBEM
and mixEM
cxx
flag to indicate whether to use the c++ (Rcpp) version. After application of Squared extrapolation methods for accelerating fixed-point iterations (R Package "SQUAREM"), the c++ version is no longer faster than non-c++ version, thus we do not recommend using this one, and might be removed at any point.
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).