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

estimate_mixprop

Estimate mixture proportions of a mixture g given noisy (error-prone) data from that mixture.


Description

Estimate mixture proportions of a mixture g given noisy (error-prone) data from that mixture.

Usage

estimate_mixprop(
  data,
  g,
  prior,
  optmethod = c("mixSQP", "mixEM", "mixVBEM", "cxxMixSquarem", "mixIP", "w_mixEM"),
  control,
  weights = NULL
)

Arguments

data

list to be passed to log_comp_dens_conv; details depend on model

g

an object representing a mixture distribution (eg normalmix for mixture of normals; unimix for mixture of uniforms). The component parameters of g (eg the means and variances) specify the components whose mixture proportions are to be estimated. The mixture proportions of g are the parameters to be estimated; the values passed in may be used to initialize the optimization (depending on the optmethod used)

prior

numeric vector indicating parameters of "Dirichlet prior" on mixture proportions

optmethod

name of function to use to do optimization

control

list of control parameters to be passed to optmethod, typically affecting things like convergence tolerance

weights

vector of weights (for use with w_mixEM; in beta)

Details

This is used by the ash function. Most users won't need to call this directly, but is exported for use by some other related packages.

Value

list, including the final loglikelihood, the null loglikelihood, an n by k likelihood matrix with (j,k)th element equal to f_k(x_j), the fit and results of optmethod


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.