Description Usage Arguments Details Value References See Also Examples

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for multivariate *F* distribution with degrees of freedom `df`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
dmvf(x, df = rep(1, k + 1), log = FALSE)
pmvf(q, df = rep(1, k + 1), algorithm = c("numerical", "MC"), nsim = 1e+07)
qmvf(
p,
df = rep(1, k + 1),
interval = c(1e-08, 1e+08),
algorithm = c("numerical", "MC"),
nsim = 1e+06
)
rmvf(n, df = rep(1, k + 1))
smvf(q, df = rep(1, k + 1), algorithm = c("numerical", "MC"), nsim = 1e+07)
``` |

`x` |
vector or matrix of quantiles. If |

`df` |
a vector of |

`log` |
logical; if TRUE, probability densities |

`q` |
a vector of quantiles. |

`algorithm` |
method to be used for calculating cumulative probability. Two options are provided as (i) |

`nsim` |
number of simulations used in algorithm |

`p` |
a scalar value corresponding to probability. |

`interval` |
a vector containing the end-points of the interval to be searched. Default value is set as |

`n` |
number of observations. |

`k` |
dimension of data or number of variates. |

Multivariate *F* distribution (Johnson and Kotz, 1972) is a joint probability distribution of positive random variables and its probability density is given as

*f(x_1, \cdots, x_k) = \frac{[ ∏_{i=1}^{k} (l_i/a)^{l_i}] Γ(∑_{i=1}^{k} l_i + a) ∏_{i=1}^{k} x_i^{l_i-1}}{Γ(a) [ ∏_{i=1}^{k} Γ(l_i)] (1+∑_{i=1}^{k} \frac{l_i}{a}x_i )^{∑_{i=1}^{k} l_i + a}},*

where *x_i>0, a>0, l_i>0, i=1,\cdots, k*. The degrees of freedom are *(2a, 2l_1,…,2l_k)*.

Cumulative distribution function *F(x_1, …, x_k)* is obtained by multiple integral

*F(x_1, …, x_k) = \int_{0}^{x_1} \cdots \int_{0}^{x_k} f(y_1, \cdots, y_k) dy_k \cdots dy_1.*

This multiple integral is calculated by either adaptive multivariate integration using `hcubature`

in package **cubature** (Narasimhan et al., 2018) or via Monte Carlo method.

Equicoordinate quantile is obtained by solving the following equation for *q* through the built-in one dimension root finding function `uniroot`

:

*\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,*

where *p* is the given cumulative probability.

The survival function *\bar{F}(x_1, \cdots, x_k)* is obtained either by the following formula related to cumulative distribution function *F(x_1, …, x_k)* (Joe, 1997)

*\bar{F}(x_1, \cdots, x_k) = 1 + ∑_{S \in \mathcal{S}} (-1)^{|S|} F_S(x_j, j \in S),*

or via Monte Carlo method.

Random numbers *X_1, \cdots, X_k* from multivariate F distribution can be generated through parameter substitutions in simulation of generalized multivariate Lomax distribution by letting *θ_i = l_i/a, i = 1, \cdots, k*; see Nayak (1987).

`dmvf`

gives the numerical values of the probability density.

`pmvf`

gives a list of two items:

*\quad* `value`

cumulative probability

*\quad* `error`

the estimated relative error by `algorithm = "numerical"`

or the estimated standard error by `algorithm = "MC"`

`qmvf`

gives the equicoordinate quantile. `NaN`

is returned for no solution found in the given interval. The result is seed dependent if Monte Carlo algorithm is chosen (`algorithm = "MC"`

).

`rmvf`

generates random numbers.

`smvf`

gives a list of two items:

*\quad* `value`

the value of survial function

*\quad* `error`

the estimated relative error by `algorithm = "numerical"`

or the estimated standard error by `algorithm = "MC"`

Joe, H. (1997). *Multivariate Models and Dependence Concepts*. London: Chapman & Hall.

Johnson, N. L. and Kotz, S. (1972). *Distribution in Statistics: Continuous Multivariate Distributions*. New York: John Wiley & Sons, INC.

Narasimhan, B., Koller, M., Johnson, S. G., Hahn, T., Bouvier, A., Kiêu, K. and Gaure, S. (2018). cubature: Adaptive Multivariate Integration over Hypercubes. R package version 2.0.3.

Nayak, T. K. (1987). Multivariate Lomax Distribution: Properties and Usefulness in Reliability Theory. *Journal of Applied Probability*, Vol. 24, No. 1, 170-177.

`uniroot`

for one dimensional root (zero) finding.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
# Calculations for the multivariate F with degrees of freedom:
# df = c(2, 4, 6)
# Vector of quantiles: c(1, 2)
dmvf(x = c(1, 2), df = c(2, 4, 6)) # Density
# Cumulative Probability using adaptive multivariate integral
pmvf(q = c(1, 2), df = c(2, 4, 6), algorithm = "numerical")
# Cumulative Probability using Monte Carlo method
pmvf(q = c(1, 2), df = c(2, 4, 6), algorithm = "MC")
# Equicoordinate quantile of cumulative probability 0.5
qmvf(p = 0.5, df = c(2, 4, 6))
# Random numbers generation with sample size 100
rmvf(n = 100, df = c(2, 4, 6))
smvf(q = c(1, 2), df = c(2, 4, 6)) # Survival function
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.