Description Usage Arguments Value Author(s) References Examples
Gibbs Sampler Algorithm to fit a three component normal mixture to z-scores
1 2 3 4 5 6 | bacon(teststatistics = NULL, effectsizes = NULL,
standarderrors = NULL, niter = 5000L, nburnin = 2000L,
nbins = 1000, trim = 0.999, level = 0.05, na.exclude = FALSE,
verbose = FALSE, priors = list(sigma = list(alpha = 1.28, beta =
0.36), mu = list(lambda = c(0, 3, -3), tau = c(1000, 100, 100)), epsilon
= list(gamma = c(90, 5, 5))))
|
teststatistics |
numeric vector or matrix of test-statistics |
effectsizes |
numeric vector or matrix of effect-sizes |
standarderrors |
numeric vector or matrix of standard errors |
niter |
number of iterations |
nburnin |
length of the burnin period |
nbins |
default 1000 else bin test-statistics |
trim |
default 0.999 trimming test-statistics |
level |
significance leve used to determine prop. null for starting values |
na.exclude |
see ?na.exclude |
verbose |
default FALSE |
priors |
list of parameters of for the prior distributions |
object of class-Bacon
mvaniterson
Implementation is based on a version from Zhihui Liu https://macsphere.mcmaster.ca/handle/11375/9368
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ##simulate some test-statistic from a normal mixture
##and run bacon
y <- rnormmix(2000, c(0.9, 0, 1, 0, 4, 1))
bc <- bacon(y)
##extract all estimated mixture parameters
estimates(bc)
##extract inflation
inflation(bc)
##extract bias
bias(bc)
##extract bias and inflation corrected test-statistics
head(tstat(bc))
##inspect the Gibbs Sampling output
traces(bc)
posteriors(bc)
fit(bc)
##simulate multiple sets of test-statistic from a normal mixture
##and run bacon
y <- matrix(rnormmix(10*2000, c(0.9, 0, 1, 0, 4, 1)), ncol=10)
bc <- bacon(y)
##extract all estimated mixture parameters
estimates(bc)
##extract only the inflation
inflation(bc)
##extract only the bias
bias(bc)
##extract bias and inflation corrected P-values
head(pval(bc))
##extract bias and inflation corrected test-statistics
head(tstat(bc))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.