posterior_dist: Compute Posterior

View source: R/ash.R

posterior_distR Documentation

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)

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

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


ashr documentation built on Aug. 22, 2023, 1:07 a.m.