elicitate | R Documentation |
elicitate
fits probability distributions to
a set of non-negative indicator observations by selecting for
each observation the distribution among a predetermined set of
model distribution families that best fits the observation
according to the least square criterion.
elicitate(
expected.value = NULL,
lower = NULL,
upper = NULL,
type.t = c("continuous"),
prob.quant = c(0.25, 0.75)
)
expected.value |
double, length = n.obs, vector of the indicator observations' expected values |
lower |
double, length = n.obs, vector of the indicator observations' lower quantiles (0.25 quartiles) |
upper |
double, length = n.obs, vector of the indicator observations' upper quantiles (0.75 quartiles) |
type.t |
character, length = 1 or n.obs, vector of types of measurement
scales. Valid types are |
prob.quant |
double, length = 2, quantiles supplied in |
The function presumes that indicator observations are each given as
three parameters of either a continuous or discrete probability distribution:
the expected value together with two quantiles. Quantiles default to
the lower- and upper quartiles respectively, but may be set to other
quantiles using the argument prob.quant
.
The predetermined set of continuous model distributions consists of the truncated normal-, lognormal-, Weibull-, gamma-, and zero-inflated exponential. The predetermined set of discrete models is the Poisson-, negative binomial-, and zero-inflated Poisson distribution families.
Negative values in any of Expected.value
, Lower
, and
Upper
are interpreted as missing values and all corresponding output
elements are set to NA
.
elicitation
is a utility function adapted to the mathematical framework
for calculating the nature index.
elicitate
returns a data.frame with dim = c(n.obs,4)
,
consisting of the following vectors
[[1]] $FK_DistID
character,
vector of names of fitted model distributions, i.e. one of
c("LogNormal", "TruncNormal", "ZIExponential", "Weibull", "Gamma",
"Poisson", "NegBinom", "ZIP")
.
[[2]] $mu
double, vector, first parameter of fitted model
distributions
[[3]] $sig
double, vector, second parameter of
fitted model distributions
[[4]] $ssq
double, vector, sum of
squared deviations between observed parameters and model distribution
parameters.
Bård Pedersen
elicitation
first tries to fit a model distribution with a call to
function estim
. If this results in an error, it calls
estimlight
instead.
Function qdev
calculates the sum of squares.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.