Learn R Programming

ashr (version 2.2-63)

posterior_dist: Compute Posterior

Description

Return the posterior on beta given a prior (g) that is a mixture of normals (class normalmix) and observation \(betahat ~ N(beta,sebetahat)\)

Usage

posterior_dist(g, betahat, sebetahat)

Value

A list, (pi1,mu1,sigma1) whose components are each k by n matrices where k is number of mixture components in g, n is number of observations in betahat

Arguments

g

a normalmix with components indicating the prior; works only if g has means 0

betahat

(n vector of observations)

sebetahat

(n vector of standard errors/deviations of observations)

Details

This can be used to obt