idm {imprecise101} | R Documentation |
Imprecise Dirichlet Model
Description
This function computes lower and upper posterior probabilities under an imprecise Dirichlet model when prior information is not available.
This function searches for the lower and upper bounds of a given level of the highest posterior density interval under the imprecise Dirichlet prior.
Usage
idm(nj, s = 1, N, tj = NA_real_, k, cA = 1)
hpd(
alpha = 3,
beta = 5,
p = 0.95,
tolerance = 1e-04,
maxiter = 100,
verbose = FALSE
)
Arguments
nj |
number of observations in the j th category |
s |
learning parameter |
N |
total number of drawings |
tj |
mean probability associated with the j th category |
k |
number of elements in the sample space |
cA |
the number of elements in the event A |
alpha |
shape1 parameter of beta distribution |
beta |
shape2 parameter of beta distribution |
p |
level of credible interval |
tolerance |
level of error allowed |
maxiter |
maximum number of iterations |
verbose |
logical option suppressing messages |
Value
idm
returns a list of lower and upper probabilities.
p.lower |
Minimum of imprecise probabilities |
p.upper |
Maximum of imprecise probabilities |
v.lower |
Variance of lower bound |
v.upper |
Variance of upper bound |
s.lower |
Standard deviation of lower bound |
s.upper |
Standard deviation of upper bound |
p |
Precise probabilty |
p.delta |
Degree of imprecision |
hpd
gives a list of scalar values corresponding to the lower and upper bounds of highest posterior probability density region.
References
Walley, P. (1996), Inferences from Multinomial Data: Learning About a Bag of Marbles. Journal of the Royal Statistical Society: Series B (Methodological), 58: 3-34. https://doi.org/10.1111/j.2517-6161.1996.tb02065.x
Examples
idm(nj=1, N=6, s=2, k=4)
x <- hpd(alpha=3, beta=5, p=0.95) # c(0.0031, 0.6587) when s=2
# round(x,4); x*(1-x)^5