linearPoolDensity: Obtain points on the density function of a linear pool

View source: R/linearPoolDensity.R

linearPoolDensityR Documentation

Obtain points on the density function of a linear pool

Description

Takes an object of class elicitation, evaluates a (weighted) linear pool, and returns points on the density function at a sequence of values of the elicited parameter

Usage

linearPoolDensity(fit, xl = -Inf, xu = Inf, d = "best", lpw = 1, nx = 200)

Arguments

fit

An object of class elicitation.

xl

The lower limit in the sequence of parameter values. The default is the 0.001 quantile of the fitted distribution (or the 0.001 quantile of a fitted normal distribution, if a histogram fit is chosen).

xu

The upper limit in the sequence of parameter values. The default is the 0.999 quantile of the fitted distribution (or the 0.999 quantile of a fitted normal distribution, if a histogram fit is chosen).

d

The distribution fitted to each expert's probabilities. Options are "normal", "t", "gamma", "lognormal", "logt","beta", "hist" (for a histogram fit), and "best" (for best fitting)

lpw

A vector of weights to be used in linear pool, if unequal weighting is desired.

nx

The number of points in the sequence from xl to xu.

Value

A list, with elements

x

a sequence of values for the uncertain parameter

fx

the density function of the linear pool, evaluated at each element in x.

Author(s)

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

Examples


## Not run: 
# Two experts
# 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<X<100. 

v <- matrix(c(30, 40, 50, 20, 25, 35), 3, 2)
p <- c(0.25, 0.5, 0.75)
myfit <- fitdist(vals = v, probs = p, lower = 0, upper = 100)
linearPoolDensity(myfit)

## End(Not run)

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