loglike: Compute log-likelihood of the variance model with mixture...

Description Usage Arguments Value Examples

Description

Suppose we observe standard errors sehat, where sehat^2~s^2 \times χ^2_{df}/df, and $s^2$ comes from an inverse-gamma mixture prior. This function computes the log-likelihood of the model.

Usage

1
loglike(sehat, df, pi, alpha, beta)

Arguments

sehat

a p vector of observed standard errors

df

the degree of freedom

pi

a k vector, the mixture proportions of the k component inverse-gamma mixture prior

alpha

a k vector, the shape parameters of the k component inverse-gamma mixture prior

beta

a k vector, the rate parameters of the k component inverse-gamma mixture prior

Value

log-likehihood

Examples

1
2
sehat = abs(rnorm(10))
loglike(sehat, df=10, pi=c(0.1,0.3,0.5), alpha=c(5,8,10), beta=c(2,4,9))

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