compute_MellinQF_ratio {QF}R Documentation

Mellin Transform of the Independent Positive QFs Ratio

Description

The function computes the Mellin transform of the ratio of independent and positive definite quadratic forms producing a MellinQF_ratio object. The output can be used to evaluate the density, cumulative and quantile functions of the target quadratic form.

Usage

compute_MellinQF_ratio(
  lambdas_num,
  lambdas_den,
  etas_num = rep(0, length(lambdas_num)),
  etas_den = rep(0, length(lambdas_den)),
  eps = 1e-06,
  rho = 1 - 1e-04,
  maxit_comp = 1e+05,
  eps_quant = 1e-06,
  maxit_quant = 10000,
  lambdas_tol = NULL
)

Arguments

lambdas_num

vector of positive weights for the numerator.

lambdas_den

vector of positive weights for the denominator.

etas_num

vector of non-centrality parameters for the numerator. Default all zeros (central chi square).

etas_den

vector of non-centrality parameters for the denominator. Default all zeros (central chi square).

eps

required absolute error for density and cumulative functions.

rho

distribution total probability mass for which it is desired to keep the error eps.

maxit_comp

maximum number of iterations.

eps_quant

required numerical error for quantile computation.

maxit_quant

maximum number of iterations before stopping the quantile computation.

lambdas_tol

maximum value admitted for the weight skewness for both the numerator and the denominator. When it is not NULL (default), elements of lambdas such that the ratio max(lambdas)/lambdas is greater than the specified value are removed.

Details

The Mellin transform of the ratio of two independent quadratic forms having positive weights lambdas_num and lambdas_den and non-centrality parameters etas_num and etas_den is computed exploiting the density formulation by Ruben (1962). The numerical error is controlled in order to provide the requested precision (eps) for the interval of quantiles that contains the specified total probability rho.

The argument eps_quant controls the relative precision requested for the computation of quantiles that determine the range in which the error eps is guaranteed, whereas maxit_quant sets the maximum number of Newton-Raphson iterations of the algorithm.

Value

The function returns an object of the class MellinQF_ratio that contains information on the Mellin transform of the ratio of two linear combinations of positively weighted chi-square random variables. This information can be used in order to evaluate the density, cumulative distribution and quantile functions of the desired quadratic form.

An object of the class MellinQF_ratio has the following components:

Source

Ruben, Harold. "Probability content of regions under spherical normal distributions, IV: The distribution of homogeneous and non-homogeneous quadratic functions of normal variables." The Annals of Mathematical Statistics 33.2 (1962): 542-570.

See Also

The function print.MellinQF_ratio can be used to summarize the basic information on the Mellin transform.

The object can be used in the function dQF_ratio to compute the density function of the QFs ratio, pQF_ratio for the CDF and qQF_ratio for the quantile function.

Examples



library(QF)
# Definition of the QFs
lambdas_QF_num <- c(rep(7, 6),rep(3, 2))
etas_QF_num <- c(rep(6, 6), rep(2, 2))
lambdas_QF_den <- c(0.6, 0.3, 0.1)
# Computation Mellin transform
eps <- 1e-7
rho <- 0.999
Mellin_ratio <- compute_MellinQF_ratio(lambdas_QF_num, lambdas_QF_den,
                                       etas_QF_num, eps = eps, rho = rho)
print(Mellin_ratio)





[Package QF version 0.0.6 Index]