Learn R Programming

SHELF (version 1.12.0)

plinearpool: Probabilities quantiles and samples from a (weighted) linear pool

Description

Calculates a linear pool given a set of elicited judgements in a fit object. Then calculates required probabilities or quantiles from the pooled cumulative distribution function, or generates a random sample.

Usage

plinearpool(fit, x, d = "best", w = 1)
qlinearpool(fit, q, d = "best", w = 1)
rlinearpool(fit, n, d = "best", w = 1)

Value

A probability or quantile, calculate from a (weighted) linear pool (arithmetic mean) of the experts' individual fitted probability.

Arguments

fit

The output of a fitdist command.

x

A vector of required cumulative probabilities P(X<=x)

d

Scalar or vector of distributions to use for each expert. Options for each vector element are "hist", "normal", "t", "gamma", "lognormal", "logt","beta", "best". If given as a scalar, same choice is used for all experts.

w

A vector of weights to be used in the weighted linear pool.

q

A vector of required quantiles

n

Number of random samples from the linear pool

Author

Jeremy Oakley <j.oakley@sheffield.ac.uk>

Details

Quantiles are calculate by first calculating the pooled cumulative distribution function at 100 points, and then using linear interpolation to invert the CDF.

Examples

Run this code
if (FALSE) {
# Expert 1 states P(X<30)=0.25, P(X<40)=0.5, P(X<50)=0.75
# Expert 2 states P(X<20)=0.25, P(X<25)=0.5, P(X<35)=0.75
# Both experts state 0

Run the code above in your browser using DataLab