fitprecision {SHELF} | R Documentation |
Fit a distribution to judgements about a population precision
Description
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.
Usage
fitprecision(
interval,
propvals,
propprobs = c(0.05, 0.95),
med = interval[1],
trans = "identity",
pplot = TRUE,
tdf = 3,
fontsize = 12
)
Arguments
interval |
A vector specifying the endpoints of an interval |
propvals |
A vector specifying two values |
propprobs |
A vector specifying two probabilities |
med |
The hypothetical value of the population median. |
trans |
A string variable taking the value |
pplot |
Plot the population distributions with median set at |
tdf |
Degrees of freedom in the fitted log Student-t distribution. |
fontsize |
Font size used in the plots. |
Details
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.
Value
Gamma |
Parameters of the fitted gamma distribution. Note that E(precision) = shape / rate. |
Log.normal |
Parameters of the fitted log normal distribution: the mean and standard deviation of log precision. |
Log.Student.t |
Parameters of the fitted log student t distributions.
Note that (log(X- |
vals |
The elicited values |
probs |
The elicited probabilities |
limits |
The lower and upper limits specified by each expert (+/- Inf if not specified). |
transform |
Transformation used for a normal population distribution. |
Examples
## Not run:
fitprecision(interval=c(60, 70), propvals=c(0.2, 0.4), trans = "log")
## End(Not run)