cdf_post function

cdf_post

cdf_post

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)

cdf_post(m, c, data)

Arguments

  • m: mixture distribution with k components
  • c: a scalar
  • data: details depend on model

Returns

an n vector containing the cdf for beta_i at c

Examples

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,set_data(betahat,sebetahat)) graphics::plot(cdf0,1-get_pp(ash.beta))
  • Maintainer: Peter Carbonetto
  • License: GPL (>= 3)
  • Last published: 2023-08-21