Learn R Programming

QuantileGH (version 0.1.8)

QLMDp: Percentages for Quantile Least Mahalanobis Distance estimation

Description

A vector of probabilities to be used in Quantile Least Mahalanobis Distance estimation (QLMDe).

Usage

QLMDp(
  from = 0.05,
  to = 0.95,
  length.out = 15L,
  equidistant = c("prob", "quantile"),
  extra = c(0.005, 0.01, 0.02, 0.03, 0.97, 0.98, 0.99, 0.995),
  x
)

Value

A numeric

vector of probabilities to be supplied to parameter p of Quantile Least Mahalanobis Distance QLMDe estimation). In practice, the length of this probability vector

p

must be equal or larger than the number of parameters in the distribution model to be estimated.

Arguments

from, to

numeric scalar, minimum and maximum of the equidistant (in probability or quantile) probabilities. Default .05 and .95, respectively

length.out

non-negative integer scalar, the number of the equidistant (in probability or quantile) probabilities.

equidistant

character scalar. If 'prob' (default), then the probabilities are equidistant. If 'quantile', then the quantiles (of the observations x) corresponding to the probabilities are equidistant.

extra

numeric vector of additional probabilities, default c(.005, .01, .02, .03, .97, .98, .99, .995).

x

numeric vector of observations, only used when equidistant = 'quantile'.

Details

The default arguments of function QLMDp() returns the probabilities of c(.005, .01, .02, .03, seq.int(.05, .95, length.out = 15L), .97, .98, .99, .995).

Examples

Run this code
library(fmx)
(d2 = fmx('GH', A = c(1,6), B = 2, g = c(0,.3), h = c(.2,0), w = c(1,2)))
set.seed(100); hist(x2 <- rfmx(n = 1e3L, dist = d2))

# equidistant in probabilities
(p1 = QLMDp()) 

# equidistant in quantiles
(p2 = QLMDp(equidistant = 'quantile', x = x2)) 

Run the code above in your browser using DataLab