Description Usage Arguments Details Value Note Author(s) References See Also Examples
calc.k
calculates Kappa
which is the ratio of the normalising constants of the lower and upper probability density functions of a Density Ratio Class. It can be interpreted as a measure of the size of a Density Ratio Class. Hence Kappa
is the target value that is minimized in the algorithm.
1 |
p |
Probabilities (in the corresponding order to the quantiles) |
q |
Quantiles (in the corresponding order to the probabilities) |
dist.lower |
Lower distribution of the Density Ratio Class (see |
dist.upper |
Upper distribution of the Density Ratio Class (see |
par.lower |
Distributional parameters of the lower distribution. |
par.upper |
Distributional parameters of the upper distribution. |
To calculate Kappa
the density with heavier tails must be the upper one. Otherwise the choice is not compatible with the definition of the Density Ratio Class (see for an example below).
Kappa |
Kappa >=1 the minimally possible ratio of the not normalised probability density functions of a Density Ratio Class that is compatible with the chosen lower and upper distribution families and elicited probability-quantile points or intervals. |
Lambda |
Lambda >=1 the minimally possible ratio of the not normalised probability density functions that is compatible with the chosen lower and upper distribution families only. |
For a better understanding what Kappa
and Lambda
are see also Eq. (4), (10), (11) and (12) in the referenced paper.
Simon L. Rinderknecht
Rinderknecht, S.L., Borsuk, M.E. and Reichert, P. Eliciting Density Ratio Classes. International Journal of Approximate Reasoning 52, 792-804, 2011. doi10.1016/j.ijar.2011.02.002. \ Rinderknecht, S. L., Borsuk, M. E. and Reichert, P. Bridging Uncertain and Ambiguous Knowledge with Imprecise Probabilities, Environmental Modelling & Software 36, 122-130, 2012.
See also fitDRC
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | p <- c(0.05, 0.25, 0.5, 0.75, 0.95)
q <- qnorm(p)
dist.lower <- dist.normal.create(par=c(1,2))
dist.upper <- dist.normal.create(par=c(3,4))
par.lower <- dist.lower$par
par.upper <- dist.upper$par
#calc.k(p, q, dist.lower, dist.upper, c(0,1), c(0,1)) # perfect matching
# of elicited data
# with chosen shapes
#calc.k(p, q, dist.lower, dist.upper, par.lower, par.upper) # general case
#calc.k(p, q, dist.lower, dist.upper, c(0,50), c(0,1)) # not compatible
# with the def. of
# the DRC.
## The function is currently defined as
function (p, q, dist.lower, dist.upper, par.lower, par.upper)
{
x.min.lower <- CDFinv(dist.lower, 0.001, par.lower)
x.max.lower <- CDFinv(dist.lower, 0.999, par.lower)
x.min.upper <- CDFinv(dist.upper, 0.001, par.upper)
x.max.upper <- CDFinv(dist.upper, 0.999, par.upper)
x.min <- min(x.min.lower, x.min.upper)
x.max <- max(x.max.lower, x.max.upper)
x <- seq(x.min, x.max, length = 1e+06)
Lambda <- max(PDF(dist.lower, x, par.lower)/PDF(dist.upper,
x, par.upper))
k1 <- (p * (1 - CDF(dist.lower, q, par.lower)))/(CDF(dist.upper,
q, par.upper) * (1 - p))
k2 <- (CDF(dist.lower, q, par.lower) * (1 - p))/(p * (1 -
CDF(dist.upper, q, par.upper)))
Kappa <- max(Lambda, k1, k2)
return(list(Kappa = Kappa, Lambda = Lambda))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.