Newer
Older
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
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elicitation.R
\name{sample_elicitation}
\alias{sample_elicitation}
\title{Function to sample an expert elicited distribution}
\usage{
sample_elicitation(n, out, smooth = TRUE, expert = NULL)
}
\arguments{
\item{n}{number of draws}
\item{out}{the output list from the elicitation function}
\item{smooth}{logical. If TRUE, uses the smoothed distribution, averaged across all experts.}
\item{expert}{a number telling which expert's distribution to draw the values from. Only implemented if smooth = FALSE.}
}
\value{
a vector of sample draws
}
\description{
Function to sample an expert elicited distribution
}
\examples{
## Elicited values for 4 experts
E1 <- c(50, 70, 100)
E2 <- c(200, 240, 280)
E3 <- c(100, 180, 300)
E4 <- c(120, 160, 220)
vals <- matrix(cbind(E1, E2, E3, E4), nrow = 3, byrow = FALSE)
## Elicited coverage probabilities from the same 4 experts
Cp = c(0.80, 0.90, 0.90, 0.70)
## Estimate
out <- elicitation(vals, Cp)
## Draw values from a smoothed, averaged distribution
sample_elicitation(n=100, out = out)
# Draw values from an indiviual expert's distribution
sample_elicitation(n=100, out = out, smooth = FALSE, expert = 3)
}