Bayesian Discount Prior: Comparison Between Current and Historical Data
Source:R/probability_discount.R
probability_discount.Rdprobability_discount can be used to estimate the posterior
probability of the comparison between historical and current data in the
context of a clinical trial with normal (mean) data.
probability_discount is not used internally but is given for
educational purposes.
Usage
probability_discount(
mu = NULL,
sigma = NULL,
N = NULL,
mu0 = NULL,
sigma0 = NULL,
N0 = NULL,
number_mcmc = 10000,
method = "fixed"
)Arguments
- mu
scalar. Mean of the current data.
- sigma
scalar. Standard deviation of the current data.
- N
scalar. Number of observations of the current data.
- mu0
scalar. Mean of the historical data.
- sigma0
scalar. Standard deviation of the historical data.
- N0
scalar. Number of observations of the historical data.
- number_mcmc
scalar. Number of Monte Carlo simulations. Default is 10000.
- method
character. Analysis method. Default value "
fixed" estimates the posterior probability and holds it fixed. Alternative method "mc" estimates the posterior probability for each Monte Carlo iteration. See the thebdpnormalvignettevignette("bdpnormal-vignette", package="bayesDP")for more details.
Value
probability_discount returns an object of class
"probability_discount".
An object of class probability_discount contains the following:
p_hatscalar. The posterior probability of the comparison historical data weight. If
method="mc", a vector of posterior probabilities of lengthnumber_mcmcis returned.
Details
This function is not used internally but is given for educational purposes. Given the inputs, the output is the posterior probability of the comparison between current and historical data in the context of a clinical trial with normal (mean) data.