Prior elicitation is the act of inducing personal opinion to be
expressed by the probabilities the person associates with an event
(Savage, 1971). The elicit
function elicits personal opinion
and the delicit
function estimates probability density to be
used with model specification in the
IterativeQuadrature
, LaplaceApproximation
,
LaplacesDemon
, LaplacesDemon.hpc
,
PMC
, or VariationalBayes
functions.
1 2 
theta 
This is a scalar or vector of parameters for which the
density is estimated with respect to the kernel density estimate of

x 
This is the elicited vector. 
a 
This is an optional lower bound for support. 
b 
This is an optional upper bound for support. 
log 
Logical. If 
n 
This is the number of chips. 
cats 
This is a vector of k categories, bins, or
intervals. When the variable is continuous, the midpoint of each
category is used. For example, if the continuous interval [0,1] has
5 equalsized categories, then 
cat.names 
This is a vector of category names. For example, if
the continuous interval [0,1] has 5 equalsized categories, then one
way or naming the categories may be 
show.plot 
Logical. If 
The elicit
function elicits a univariate, discrete,
nonconjugate, informative, prior probability distribution by
offering a number of chips (specified as n
by the statistician)
for the user to allocate into categories specified by the
statistician. The results of multiple elicitations (meaning, with
multiple people), each the output of elicit
, may be combined
with the c
function in base R.
This discrete distribution is included with the data for
a model and supplied to a model specification function, where in turn
it is supplied to the delicit
function, which estimates the
density at the current value of the prior distribution,
p(theta). The prior distribution may be either
continuous or discrete, will be proper, and may have bounded support
(constrained to an interval).
For a minimal example, a statistician elicits the prior probability distribution for a regression effect, β. Nonstatisticians would not be asked about expected parameters, but could be asked about how much y would be expected to change given a oneunit change in x. After consulting with others who have prior knowledge, the support does not need to be bounded, and their guesses at the range result in the statistician creating 5 catgories from the interval [1,4], where each interval has a width of one. The statistician schedules time with 3 people, and each person participates when the statistician runs the following R code:
x < elicit(n=10, cats=c(0.5, 0.5, 1.5, 2.5, 3.5),
cat.names=c("1:<0", "0:<1", "1:<2", "2:<3", "3:4"), show.plot=TRUE)
Each of the 3 participants receives 10 chips to allocate among the 5 categories according to personal beliefs in the probability of the regression effect. When the statistician and each participant accept their elicited distribution, all 3 vectors are combined into one vector. In the model form, the prior is expressed as
p(beta) ~ EL
and the code for the model specification is
elicit.prior < delicit(beta, x, log=TRUE)
This method is easily extended to priors that are multivariate, correlated, or conditional.
As an alternative, Hahn (2006) also used a categorical approach,
eliciting judgements about the relative likelihood of each category,
and then minimizes the KLD (for more information on KLD, see the
KLD
function).
Statisticat, LLC. software@bayesianinference.com
Hahn, E.D. (2006). "Reexamining Informative Prior Elicitation Through the Lens of Markov chain Monte Carlo Methods". Journal of the Royal Statistical Society, A 169 (1), p. 37–48.
Savage, L.J. (1971). "Elicitation of Personal Probabilities and Expectations". Journal of the American Statistical Association, 66(336), p. 783–801.
de.Finetti.Game
,
KLD
,
IterativeQuadrature
,
LaplaceApproximation
,
LaplacesDemon
,
LaplacesDemon.hpc
,
PMC
, and
VariationalBayes
.
1 2 3 4 5  library(LaplacesDemon)
x < c(1,2,2,3,3,3,4,7,8,8,9,10) #Elicited with elicit function
theta < seq(from=5,to=15,by=.1)
plot(theta, delicit(theta,x), type="l", xlab=expression(theta),
ylab=expression("p(" * theta * ")"))

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.