View source: R/EmpiricalCalibrationUsingMcmc.R
fitMcmcNull | R Documentation |
fitNull
fits the null distribution to a set of negative controls using Markov Chain Monte
Carlo (MCMC).
fitMcmcNull(logRr, seLogRr, iter = 1e+05)
logRr |
A numeric vector of effect estimates on the log scale |
seLogRr |
The standard error of the log of the effect estimates. Hint: often the standard error = (log(<lower bound 95 percent confidence interval>) - log(<effect estimate>))/qnorm(0.025) |
iter |
Number of iterations of the MCMC. |
This is an experimental function for computing the 95 percent credible interval of a calibrated p-value using Markov-Chain Monte Carlo (MCMC).
An object of type mcmcNull
containing the mean and standard deviation (both on the log
scale) of the null distribution, as well as the MCMC trace.
## Not run:
data(sccs)
negatives <- sccs[sccs$groundTruth == 0, ]
null <- fitMcmcNull(negatives$logRr, negatives$seLogRr)
null
plotMcmcTrace(null)
positive <- sccs[sccs$groundTruth == 1, ]
calibrateP(null, positive$logRr, positive$seLogRr)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.