cdffeedback: Feedback for the elicited distribution of the population CDF

Description Usage Arguments Details Value Examples

View source: R/cdffeedback.R

Description

Report the median and 100(1-alpha)% credible interval for point on the population CDF

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
cdffeedback(
  medianfit,
  precisionfit,
  quantiles = c(0.05, 0.95),
  vals = NA,
  alpha = 0.05,
  median.dist = "best",
  precision.dist = "gamma",
  n.rep = 10000
)

Arguments

medianfit

The output of a fitdist command following elicitation of the expert's beliefs about the population median.

precisionfit

The output of a fitprecision command following elicitation of the expert's beliefs about the population precision.

quantiles

A vector of quantiles q_1, …,q_n required for feedback

vals

A vector of population values x_1,…,x_n required for feedback

alpha

The size of the 100(1-alpha)% credible interval

median.dist

The fitted distribution for the population median. Can be one of "normal", "lognormal" or "best", where "best" will select the best fitting out of normal and lognormal.

precision.dist

The fitted distribution for the population precision. Can either be "gamma" or "lognormal".

n.rep

The number of randomly sampled CDFs used to estimated the median and credible interval.

Details

Denote the uncertain population CDF by

P(X ≤ x | μ, σ^2),

where μ is the uncertain population median and σ^(-2) is the uncertain population precision. Feedback can be reported in the form of the median and 100(1-alpha)% credible interval for (a) an uncertain probability P(X ≤ x | μ, σ^2), where x is a specified population value and (b) an uncertain quantile x_q defined by P(X ≤ x_q | μ, σ^2) = q, where q is a specified population probability.

Value

Fitted median and 100(1-alpha)% credible interval for population quantiles and probabilities.

$quantiles

Each row gives the fitted median and 100(1-alpha)% credible interval for each uncertain population quantile specified in quantiles: the fitted median and 100(1-alpha)% credible interval for the value of x_{q_i} where P(X≤ x_{q_i} | μ, σ^2) = q_i.

$probs

Each row gives the fitted median and 100(1-alpha)% credible interval for each uncertain population probability specified in probs: the fitted median and 100(1-alpha)% credible interval for the value of P(X≤ x_i | μ, σ^2).

Examples

1
2
3
4
5
6
7
## Not run: 
prfit <- fitprecision(interval = c(60, 70), propvals = c(0.2, 0.4), trans = "log")
medianfit <- fitdist(vals = c(50, 60, 70), probs = c(0.05, 0.5,  0.95), lower = 0)
cdffeedback(medianfit, prfit, quantiles = c(0.01, 0.99),
            vals = c(65, 75), alpha = 0.05, n.rep = 10000)
 
## End(Not run)  

OakleyJ/SHELF documentation built on Feb. 14, 2020, 8:17 a.m.