Plots the fitted density function for one or more experts. Can also plot a fitted linear pool if more than one expert. If plotting the density function of one expert, or the linear pool only, can also indicated desired lower and upper fitted quantiles.
plotfit(
fit,
d = "best",
xl = -Inf,
xu = Inf,
yl = 0,
yu = NA,
ql = NA,
qu = NA,
lp = FALSE,
ex = NA,
sf = 3,
ind = TRUE,
lpw = 1,
fs = 12,
lwd = 1,
xlab = "x",
ylab = expression(f[X](x)),
legend_full = TRUE,
percentages = FALSE,
returnPlot = FALSE,
showPlot = TRUE
)
An object of class elicitation
.
The distribution fitted to each expert's probabilities. Options are
"normal"
, "t"
, "skewnormal"
, "gamma"
, "lognormal"
,
"logt"
,"beta"
, "mirrorgamma"
,
"mirrorlognormal"
, "mirrorlogt"
"hist"
(for a histogram fit), and
"best"
(for best fitting)
The lower limit for the x-axis. The default is the 0.001 quantile of the fitted distribution (or the 0.001 quantile of a fitted normal distribution, if a histogram fit is chosen).
The upper limit for the x-axis. The default is the 0.999 quantile of the fitted distribution (or the 0.999 quantile of a fitted normal distribution, if a histogram fit is chosen).
The lower limit for the y-axis. Default value is 0.
The upper limit for the y-axis. Will be set automatically if not specified.
A lower quantile to be indicated on the density function plot. Only displayed when plotting the density function for a single expert.
An upper quantile to be indicated on the density function plot. Only displayed when plotting the density function for a single expert.
For multiple experts, set lp = TRUE
to plot a linear pool.
If judgements have been elicited from multiple experts, but a density plot for one expert only is required, the expert to be used in the plot.
The number of significant figures to be displayed for the parameter values.
If plotting a linear pool, set ind = FALSE
to suppress
plotting of the individual density functions.
A vector of weights to be used in linear pool, if unequal weighting is desired.
The font size used in the plot.
The line width used in the plot.
A string or expression giving the x-axis label.
A string or expression giving the y-axis label.
If plotting a linear pool, set ind = TRUE
for each expert
to be plotted with a different colour, and ind = FALSE
for each expert to be
plotted with the same colour, reducing the legend size.
Set to TRUE
to use percentages on the x-axis.
Set to TRUE
to return the plot as a ggplot object.
Set to FALSE
to suppress displaying the plot.
Jeremy Oakley <j.oakley@sheffield.ac.uk>
if (FALSE) {
# Two experts
# Expert 1 states P(X<30)=0.25, P(X<40)=0.5, P(X<50)=0.75
# Expert 2 states P(X<20)=0.25, P(X<25)=0.5, P(X<35)=0.75
# Both experts state 0
Run the code above in your browser using DataLab