Learn R Programming

ashr (version 0.9.2)

cdf_post: cdf_post

Description

evaluate cdf of posterior distribution of beta at c. m is the prior on beta, a mixture; c is location of evaluation assumption is betahat | beta ~ t_v(beta,sebetahat)

Usage

cdf_post(m, c, betahat, sebetahat, v)

Arguments

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

Value

an n vector containing the cdf for beta_i at c

Examples

Run this code
beta = rnorm(100,0,1)
betahat= beta+rnorm(100,0,1)
sebetahat=rep(1,100)
ash.beta = ash(betahat,1,mixcompdist="normal")
cdf0 = cdf_post(ash.beta$fitted.g,0,betahat,sebetahat,NULL)
plot(cdf0,1-ash.beta$PositiveProb)

Run the code above in your browser using DataLab