Description Usage Arguments Value Examples
Discovery threshold function
1 | discovery_thresh(p0, G, snew, cnew, covmat, lambda_mean, alpha1, M)
|
p0 |
prior mass on |
G |
grid over which the signal is evaluated |
snew |
matrix of signal widths, same dimensions as |
cnew |
matrix of signal normalizing constants - dimensions are (size of grid |
covmat |
covariance matrix for teh background prior |
lambda_mean |
mean vector for the background prior |
M |
number of iterations used to estimate the lower 5 percent quantile of the mass marginal posterior |
lambda0 |
initial backgorund value |
y |
observations |
discovery threshold
1 2 3 4 5 6 7 8 9 10 11 12 | load("data/SMC_full_poly")
L = dim(post2$thetat)[2]
dd_theta = density(post2$thetat[,L])
theta = dd_theta$x[which.max(dd_theta$y)]
dd_tau = density(post2$taut[,L])
tau = dd_tau$x[which.max(dd_tau$y)]
beta = apply(post2$beta[,L,], 2, mean)
xG = (G - min(G))/(max(G) - min(G))
covmat = Gausscor(xG, theta, tau)
lambda_mean = log(poly(beta, xG)) - tau/2
cg = floor(seq(1, length(G), length = 100))
Qdis = discovery_thresh(p0 = .5, G, snew, cnew, covmat, lambda_mean, alpha1 = 3e-07, 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.