Takes elicited probabilities about proportion of a population lying in a specfied interval as inputs, converts the judgements into probability judgements about the population precision, and fits gamma and lognormal distributions to these judgements using the fitdist function.
fitprecision(
interval,
propvals,
propprobs = c(0.05, 0.95),
med = interval[1],
trans = "identity",
pplot = TRUE,
tdf = 3,
fontsize = 12
)
Parameters of the fitted gamma distribution. Note that E(precision) = shape / rate.
Parameters of the fitted log normal distribution: the mean and standard deviation of log precision.
Parameters of the fitted log student t distributions.
Note that (log(X- lower
) - location) / scale has a standard t distribution. The
degrees of freedom is not fitted: it is specified as an input argument.
The elicited values \(\theta_1, \theta_2\)
The elicited probabilities \(p_1, p_2\)
The lower and upper limits specified by each expert (+/- Inf if not specified).
Transformation used for a normal population distribution.
A vector specifying the endpoints of an interval \([k_1, k_2]\).
A vector specifying two values \(\theta_1, \theta_2\) for the proportion.
A vector specifying two probabilities \(p_1, p_2\).
The hypothetical value of the population median.
A string variable taking the value "identity"
, "log"
or
"logit"
corresponding to whether the population distribution is normal, lognormal
or logit-normal respectively.
Plot the population distributions with median set at \(k_1\)
and precision fixed at the two elicited quantiles implied by propvals
and propprobs
.
Degrees of freedom in the fitted log Student-t distribution.
Font size used in the plots.
The expert provides a pair of probability judgements
$$P(\theta < \theta_1 ) = p_1,$$ and $$P(\theta < \theta_2) = p_2,$$
where \(\theta\) is the proportion of the population that lies in the interval
\([k_1, k_2]\), conditional on the population median taking some hypothetical value (\(k_1\)
by default). \(k_1\) can be set to -Inf
, or \(k_2\) can be set to Inf
;
in either case, the hypothetical median value must be specified. If both \(k_1\)
and \(k_2\) are finite, the hypothetical median must be one of the interval endpoints.
Note that, unlike the fitdist command, a 'best fitting'
distribution is not reported, as the distributions are fitted to two elicited
probabilities only.
if (FALSE) {
fitprecision(interval=c(60, 70), propvals=c(0.2, 0.4), trans = "log")
}
Run the code above in your browser using DataLab