Learn R Programming

MVT (version 0.3)

Weights: Distribution of the weights from a multivariate t-distribution

Description

Density, distribution function and quantile function for the weights distribution arising from the multivariate t-distribution with dimension dim and shape parameter eta.

Usage

dweights(x, eta = .25, dim, log = FALSE, scaled = TRUE) pweights(q, eta = .25, dim, lower.tail = TRUE, log.p = FALSE, scaled = TRUE) qweights(p, eta = .25, dim, lower.tail = TRUE, log.p = FALSE, scaled = TRUE)

Arguments

x, q
vector of quantiles.
p
vector of probabilities.
eta
shape parameter of the multivariate t-distribution, must be in the interval $[0,1/2)$. Default value is eta = 0.25.
dim
dimension of the multivariate t-distribution.
log, log.p
logical; if TRUE, probabilities p are given as $\log(p)$.
lower.tail
logical; if TRUE (default), probabilities are $P(X \le x)$, otherwise, $P(X > x)$.
scaled
logical; if TRUE, the weights are scaled to belong the interval (0,1).

Value

dweights gives the density, pweights the distribution function, and qweights the quantile function.Invalid arguments will result in return value NaN, with a warning.

Details

The weights' distribution with parameters eta and dim $= p$ has density $$f(x) = \frac{m^{1-(1/\eta + p)/2}}{B(1/(2\eta),p/2)}{x}^{1/(2\eta)-1}{(m-x)}^{p/2-1}% $$ for $0 \le \eta < 1/2$, $p > 0$ and $0 < x < m$, where $m = (1 + p\eta)/(1 - 2\eta)$. The mean is $E(X) = 1/(1-2\eta)$ and the variance is $$Var(X) = \frac{2p\eta^2}{(1+(p+2)\eta){(1-2\eta)}^2}$$ The scaled version of the weights distribution has a Beta distribution with parameters $1/(2\eta)$ and $p/2$.

References

Abramowitz, M., and Stegun, I.A. (1972). Handbook of Mathematical Functions. Dover, New York. Chapter 6: Gamma and related functions.

Johnson, N.L., Kotz, S., and Balakrishnan, N. (1995). Continuous Univariate Distributions, volume 2, 2nd Ed. Wiley, New York. Chapter 25: Beta distributions. Osorio, F., and Galea, M. (2015). Statistical inference in multivariate analysis using the t-distribution. Unpublished manuscript.

See Also

Distributions for other standard distributions.

beta for the Beta function.

Examples

Run this code
data(companies)
fit <- studentFit(companies, family = Student(eta = .25))

# compute the 5% quantile from the estimated distribution of the weights
p <- fit$dims[2]
eta <- fit$eta
wts <- fit$weights
cutoff <- qweights(.05, eta = eta, dim = p, scaled = FALSE)

# identify observations with 'small' weights
n <- fit$dims[1]
which <- seq_len(n)[wts < cutoff]
which

Run the code above in your browser using DataLab