Description Usage Arguments See Also Examples
badr
supports PointMass
, Beta
, BetaMixture
, and
JeffreysPrior
distributions for the reponse probability.
The probability density function and cumulative probability functions are
available via density
and cdf
methods.
The mean of a distribution can quickly be accessed via mean
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## S4 method for signature 'Prior'
density(x, p)
cdf(prior, p, ...)
## S4 method for signature 'Prior,numeric'
cdf(prior, p)
## S4 method for signature 'Prior'
mean(x)
PointMass(p)
Beta(a, b)
Beta_mu_sd(mu, sd)
JeffreysPrior(design)
|
x |
|
p |
probability atom, i.e. the response probability equals |
prior |
|
a |
Beta distribution parameter |
b |
Beta distribution paramter |
mu |
mean parameter |
sd |
standard deviation paramter |
design |
|
condition
for restricting the support of a prior,
updating
for Bayesian posterior updates
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 | badr::load_julia_package()
## Not run:
density(Beta(1, 1), seq(0, 1, .1)) == 1 # uniform distribution on [0, 1]
## End(Not run)
## Not run:
cdf(PointMass(1/3), c(0.3, 1/3)) == c(0, 1)
## End(Not run)
## Not run:
mean(Beta(5, 7)) == 5/(5 + 7)
## End(Not run)
## Not run:
PointMass(0.4)
## End(Not run)
## Not run:
Beta(5, 7)
1/3*Beta(5, 7) + 2/3*Beta(1,1) # create a BetaMixture distribution
## End(Not run)
## Not run:
Beta_mu_sd(.3, .2)
## End(Not run)
## Not run:
design <- Design(c(0, 30, 25, 0), c(Inf, 10, 7, -Inf))
JeffreysPrior(design)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.