est_singlecomp_mm: Estimate the single component inverse-gamma prior of...

Description Usage Arguments Value Examples

Description

Suppose the true variances come from a single component inverse-gamma prior, and standard errors (noisy estimates of the square root of true variances) are observed. This function estimates the single component inverse-gamma prior of variances by matching the moments.

Usage

1

Arguments

sehat

n vector of standard errors of observations

df

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

Value

The shape (a) and rate (b) of the fitted inverse-gamma prior

Examples

1
2
3
sd = sqrt(1/rgamma(100,5,5)) #true prior: IG(5,5)
sehat = sqrt(sd^2*rchisq(100,7)/7) 
est_singlecomp_mm(sehat=sehat,df=7) 

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