est_mixprop_mode: Estimate mixture proportions and mode of the unimodal...

Description Usage Arguments Value Examples

Description

Estimate mixture proportions and mode of the unimodal inverse-gaama mixture variance prior.

Usage

1
2
est_mixprop_mode(sehat, g, prior, df, unimodal, singlecomp, estpriormode,
  maxiter = 5000)

Arguments

sehat

n vector of standard errors of observations

g

the initial prior distribution for variances

prior

numeric vector indicating Dirichlet prior on mixture proportions

df

appropriate degrees of freedom for chi-square distribution of sehat^2

unimodal

put unimodal constraint on the prior distribution of variances ("variance") or precisions ("precision")

singlecomp

logical, indicating whether to use a single inverse-gamma distribution as the prior distribution for the variances

estpriormode

logical, indicating whether to estimate the mode of the unimodal prior

maxiter

maximum number of iterations of the EM algorithm

Value

A list, including the final loglikelihood, the fitted prior g, number of iterations and a flag to indicate convergence.

Examples

1
2
fitted.prior = est_mixprop_mode(sehat=abs(rnorm(100)),g=igmix(c(.5,.5),c(1,3),c(1,3)),
prior=c(1,1),df=10,unimodal="variance",singlecomp=FALSE,estpriormode=TRUE)

mengyin/vashr documentation built on May 22, 2019, 6:51 p.m.