cdffeedback: Feedback for the elicited distribution of the population CDF

View source: R/cdffeedback.R

cdffeedbackR Documentation

Feedback for the elicited distribution of the population CDF

Description

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

Usage

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, \ldots,q_n required for feedback

vals

A vector of population values x_1,\ldots,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 \le x | \mu, \sigma^2),

where \mu is the uncertain population median and \sigma^(-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 \le x | \mu, \sigma^2), where x is a specified population value and (b) an uncertain quantile x_q defined by P(X \le x_q | \mu, \sigma^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\le x_{q_i} | \mu, \sigma^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\le x_i | \mu, \sigma^2).

Examples

## 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)  

SHELF documentation built on Sept. 11, 2024, 6:54 p.m.