estimate_mixprop: Estimate mixture proportions of sigmaa by EM algorithm

Description Usage Arguments Value

Description

Estimate mixture proportions of sigmaa by EM algorithm

Usage

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

Arguments

betahat

a p vector of estimates

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), or "unit" (1/K,...,1/K) [for optmethod = mixVBEM version only]

optmethod

specifies optimization method used. Default is "mixIP", an interior point method, if REBayes is installed; otherwise an EM algorithm is used. The interior point method is faster for large problems (n>2000).

null.comp

the position of the null component

df

appropriate degrees of freedom for (t) distribution of betahat/sebetahat if likelihood = "t".

control

A list of control parameters for the optmization 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). User may supply changes to this list of parameter, say, control = list(maxiter = 10000, trace = TRUE).

errordist

A list of objects of either class normalmix or unimix. The length of this list must be the length of betahat. Note that errordist[[i]] is the ith error distribution of betahat[i]. Defaults to NULL, in which case stramash.workhorse will assume either a normal, t, or Laplace likelihood, depending on the value for likelihood.

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.


dcgerard/stramash documentation built on May 15, 2019, 1:24 a.m.