Learn R Programming

ashr (version 0.9.2)

comp_postsd: comp_postsd

Description

output posterior sd for beta for each component of prior mixture m,given observations betahat, sebetahat, df v

Usage

comp_postsd(m, betahat, sebetahat, v)

Arguments

m
mixture distribution with k components
betahat
an n vector of observations
sebetahat
an n vector of standard errors
v
degree of freedom of error distribution

Examples

Run this code
beta = rnorm(100,0,1)
betahat= beta+rnorm(100,0,1)
ash.beta = ash(betahat,1,mixcompdist="normal")
comp_postmean(ash.beta$fitted.g,betahat,rep(1,100),NULL)
comp_postsd(ash.beta$fitted.g,betahat,rep(1,100),NULL)
comppostprob(ash.beta$fitted.g,betahat,rep(1,100),NULL)

Run the code above in your browser using DataLab