Package 'NonNorMvtDist'

Title: Multivariate Lomax (Pareto Type II) and Its Related Distributions
Description: Implements calculation of probability density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for the following multivariate distributions: Lomax (Pareto Type II), generalized Lomax, Mardia’s Pareto of Type I, Logistic, Burr, Cook-Johnson’s uniform, F and Inverted Beta. See Tapan Nayak (1987) <doi:10.2307/3214068>.
Authors: Zhixin Lun [aut, cre] , Ravindra Khattree [aut]
Maintainer: Zhixin Lun <[email protected]>
License: GPL-3
Version: 1.0.2
Built: 2024-11-20 06:23:29 UTC
Source: CRAN

Help Index


Multivariate Burr Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for multivariate Burr distribution with a scalar parameter parm1 and vectors of parameters parm2 and parm3.

Usage

dmvburr(x, parm1 = 1, parm2 = rep(1, k), parm3 = rep(1, k), log = FALSE)

pmvburr(q, parm1 = 1, parm2 = rep(1, k), parm3 = rep(1, k))

qmvburr(
  p,
  parm1 = 1,
  parm2 = rep(1, k),
  parm3 = rep(1, k),
  interval = c(0, 1e+08)
)

rmvburr(n, parm1 = 1, parm2 = rep(1, k), parm3 = rep(1, k))

smvburr(q, parm1 = 1, parm2 = rep(1, k), parm3 = rep(1, k))

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm1

a scalar parameter, see parameter aa in Details.

parm2

a vector of parameters, see parameters did_i in Details.

parm3

a vector of parameters, see parameters cic_i in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

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 c(0, 1e8).

n

number of observations.

k

dimension of data or number of variates.

Details

Multivariate Burr distribution (Johnson and Kotz, 1972) is a joint distribution of positive random variables X1,,XkX_1, \cdots, X_k. Its probability density is given as

f(x1,,xk)=[i=1kcidi]a(a+1)(a+k1)[i=1kxici1](1+i=1kdixici)a+k,f(x_1, \cdots, x_k) = \frac{[ \prod_{i=1}^{k} c_i d_i] a(a+1) \cdots (a+k-1) [ \prod_{i=1}^{k} x_i^{c_i-1}]}{(1 + \sum_{i=1}^{k} d_i x_i^{c_i})^{a+k}},

where xi>0,a,ci,di>0,i=1,,kx_i >0, a,c_i,d_i>0, i=1,\cdots, k.

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is obtained by the following formula related to survival function Fˉ(x1,,xk)\bar{F}(x_1, \dots, x_k) (Joe, 1997)

F(x1,,xk)=1+SS(1)SFˉS(xj,jS),F(x_1, \dots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} \bar{F}_S(x_j, j \in S),

where the survival function is given by

Fˉ(x1,,xk)=(1+i=1kdixici)a.\bar{F}(x_1, \cdots, x_k) = \left( 1+\sum_{i=1}^{k} d_i x_i^{c_i} \right)^{-a}.

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

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

Random numbers X1,,XkX_1, \cdots, X_k from multivariate Burr distribution can be generated through transformation of multivariate Lomax random variables Y1,,YkY_1, \cdots, Y_k by letting Xi=(θiYi/di)1/ci,i=1,,kX_i=(\theta_i Y_i/d_i)^{1/c_i}, i = 1, \cdots, k; see Nayak (1987).

Value

dmvburr gives the numerical values of the probability density.

pmvburr gives the cumulative probability.

qmvburr gives the equicoordinate quantile.

rmvburr generates random numbers.

smvburr gives the value of survival function.

References

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.

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

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the multivariate Burr with parameters:
# a = 3, d1 = 1, d2 = 3, d3 = 5, c1 = 2, c2 = 4, c3 = 6
# Vector of quantiles: c(3, 2, 1)

dmvburr(x = c(3, 2, 1), parm1 = 3, parm2 = c(1, 3, 5), parm3 = c(2, 4, 6)) # Density

pmvburr(q = c(3, 2, 1), parm1 = 3, parm2 = c(1, 3, 5), parm3 = c(2, 4, 6)) # Cumulative Probability

# Equicoordinate quantile of cumulative probability 0.5
qmvburr(p = 0.5, parm1 = 3, parm2 = c(1, 3, 5), parm3 = c(2, 4, 6))

# Random numbers generation with sample size 100
rmvburr(n = 100, parm1 = 3, parm2 = c(1, 3, 5), parm3 = c(2, 4, 6))

smvburr(q = c(3, 2, 1), parm1 = 3, parm2 = c(1, 3, 5), parm3 = c(2, 4, 6)) # Survival function

Multivariate F Distribution

Description

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

Usage

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)

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

df

a vector of k+1k+1 degrees of freedom, see parameter (2a,2l1,,2lk)(2a, 2l_1, \ldots, 2l_k) in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

algorithm

method to be used for calculating cumulative probability. Two options are provided as (i) numerical using adaptive multivariate integral and (ii) MC using Monte Carlo method. Recommend algorithm numerical for (k<=4)(k <= 4) dimension and MC for (k>4)(k > 4) dimension based on running time consumption. Default option is set as numerical.

nsim

number of simulations used in algorithm MC.

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 c(1e-8, 1e8).

n

number of observations.

k

dimension of data or number of variates.

Details

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

f(x1,,xk)=[i=1k(li/a)li]Γ(i=1kli+a)i=1kxili1Γ(a)[i=1kΓ(li)](1+i=1kliaxi)i=1kli+a,f(x_1, \cdots, x_k) = \frac{[ \prod_{i=1}^{k} (l_i/a)^{l_i}] \Gamma(\sum_{i=1}^{k} l_i + a) \prod_{i=1}^{k} x_i^{l_i-1}}{\Gamma(a) [ \prod_{i=1}^{k} \Gamma(l_i)] (1+\sum_{i=1}^{k} \frac{l_i}{a}x_i )^{\sum_{i=1}^{k} l_i + a}},

where xi>0,a>0,li>0,i=1,,kx_i>0, a>0, l_i>0, i=1,\cdots, k. The degrees of freedom are (2a,2l1,,2lk)(2a, 2l_1,\dots,2l_k).

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is obtained by multiple integral

F(x1,,xk)=0x10xkf(y1,,yk)dykdy1.F(x_1, \dots, 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 qq through the built-in one dimension root finding function uniroot:

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

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

Fˉ(x1,,xk)=1+SS(1)SFS(xj,jS),\bar{F}(x_1, \cdots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} F_S(x_j, j \in S),

or via Monte Carlo method.

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

Value

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"

References

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.

See Also

uniroot for one dimensional root (zero) finding.

Examples

# 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

Generalized Multivariate Lomax (Pareto Type II) Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for generalized multivariate Lomax distribution with a scalar parameter parm1 and vectors of parameters parm2 and parm3.

Usage

dmvglomax(x, parm1 = 1, parm2 = rep(1, k), parm3 = rep(1, k), log = FALSE)

pmvglomax(
  q,
  parm1 = 1,
  parm2 = rep(1, k),
  parm3 = rep(1, k),
  algorithm = c("numerical", "MC"),
  nsim = 1e+07
)

qmvglomax(
  p,
  parm1 = 1,
  parm2 = rep(1, k),
  parm3 = rep(1, k),
  interval = c(1e-08, 1e+08),
  algorithm = c("numerical", "MC"),
  nsim = 1e+06
)

rmvglomax(n, parm1 = 1, parm2 = rep(1, k), parm3 = rep(1, k))

smvglomax(
  q,
  parm1 = 1,
  parm2 = rep(1, k),
  parm3 = rep(1, k),
  algorithm = c("numerical", "MC"),
  nsim = 1e+07
)

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm1

a scalar parameter, see parameter aa in Details.

parm2

a vector of parameters, see parameters θi\theta_i in Details.

parm3

a vector of parameters, see parameters lil_i in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

algorithm

method to be used for calculating cumulative probability. Two options are provided as (i) numerical using adaptive multivariate integral and (ii) MC using Monte Carlo method. Recommend algorithm numerical for (k<=4)(k <= 4) dimension and MC for (k>4)(k > 4) dimension based on running time consumption. Default option is set as numerical.

nsim

number of simulations used in algorithm MC.

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 c(1e-8, 1e8).

n

number of observations.

k

dimension of data or number of variates.

Details

Generalized multivariate Lomax (Pareto type II) distribution was introduced by Nayak (1987) as a joint probability distribution of several skewed nonnegative random variables X1,X2,,XkX_1, X_2, \cdots, X_k. Its probability density function is given by

f(x1,,xk)=[i=1kθili]Γ(i=1kli+a)i=1kxili1Γ(a)[i=1kΓ(li)](1+i=1kθixi)i=1kli+a,f(x_1, \cdots, x_k) = \frac{[ \prod_{i=1}^{k} \theta_i^{l_i}] \Gamma(\sum_{i=1}^{k} l_i + a ) \prod_{i=1}^{k} x_i^{l_i-1}}{\Gamma(a)[ \prod_{i=1}^{k} \Gamma(l_i)] (1+\sum_{i=1}^{k} \theta_i x_i )^{\sum_{i=1}^{k} l_i + a}},

where xi>0,a,θi,li>0,i=1,,kx_i>0, a,\theta_i, l_i>0, i=1,\cdots,k.

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is obtained by multiple integral

F(x1,,xk)=0x10xkf(y1,,yk)dykdy1.F(x_1, \dots, 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 qq through the built-in one dimension root finding function uniroot:

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

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

Fˉ(x1,,xk)=1+SS(1)SFS(xj,jS),\bar{F}(x_1, \cdots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} F_S(x_j, j \in S),

or via Monte Carlo method.

Random numbers from generalized multivariate Lomax distribution can be generated by simulating kk independent gamma random variables having a common parameter following gamma distribution with shape parameter aa and scale parameter 11; see Nayak (1987).

Value

dmvglomax gives the numerical values of the probability density.

pmvglomax 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"

qmvglomax 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").

rmvglomax generates random numbers.

smvglomax 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"

References

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

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.

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the generalized multivariate Lomax with parameters:
# a = 5, theta1 = 1, theta2 = 2, l1 = 4, l2 = 5
# Vector of quantiles: c(5, 6)

dmvglomax(x = c(5, 6), parm1 = 5, parm2 = c(1, 2), parm3 = c(4, 5)) # Density


# Cumulative Probability using adaptive multivariate integral
pmvglomax(q = c(5, 6), parm1 = 5, parm2 = c(1, 2), parm3 = c(4, 5))


# Cumulative Probability using Monte Carlo method
pmvglomax(q = c(5, 6), parm1 = 5, parm2 = c(1, 2), parm3 = c(4, 5), algorithm = "MC")


# Equicoordinate quantile of cumulative probability 0.5
qmvglomax(p = 0.5, parm1 = 5, parm2 = c(1, 2), parm3 = c(4, 5))

# Random numbers generation with sample size 100
rmvglomax(n = 100, parm1 = 5, parm2 = c(1, 2), parm3 = c(4, 5))

smvglomax(q = c(5, 6), parm1 = 5, parm2 = c(1, 2), parm3 = c(4, 5)) # Survival function

Multivariate Inverted Beta Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for multivariate inverted beta distribution with a scalar parameter parm1 and a vector of parameters parm2.

Usage

dmvinvbeta(x, parm1 = 1, parm2 = rep(1, k), log = FALSE)

pmvinvbeta(
  q,
  parm1 = 1,
  parm2 = rep(1, k),
  algorithm = c("numerical", "MC"),
  nsim = 1e+07
)

qmvinvbeta(
  p,
  parm1 = 1,
  parm2 = rep(1, k),
  interval = c(1e-08, 1e+08),
  algorithm = c("numerical", "MC"),
  nsim = 1e+06
)

rmvinvbeta(n, parm1 = 1, parm2 = rep(1, k))

smvinvbeta(
  q,
  parm1 = 1,
  parm2 = rep(1, k),
  algorithm = c("numerical", "MC"),
  nsim = 1e+07
)

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm1

a scalar parameter, see parameter aa in Details.

parm2

a vector of parameters, see parameter lil_i in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

algorithm

method to be used for calculating cumulative probability. Two options are provided as (i) numerical using adaptive multivariate integral and (ii) MC using Monte Carlo method. Recommend algorithm numerical for (k<=4)(k <= 4) dimension and MC for (k>4)(k > 4) dimension based on running time consumption. Default option is set as numerical.

nsim

number of simulations used in algorithm MC.

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 c(1e-8, 1e8).

n

number of observations.

k

dimension of data or number of variates.

Details

Multivariate inverted beta distribution is an alternative expression of multivariate F distribution and is a special case of multivariate Lomax distribution (Balakrishnan and Lai, 2009). Its probability density is given as

f(x1,,xp)=Γ(i=1pli+a)i=1pxili1Γ(a)[i=1pΓ(li)](1+i=1pxi)i=1pli+a,f(x_1, \cdots, x_p) = \frac{\Gamma(\sum_{i=1}^{p} l_i + a) \prod_{i=1}^{p} x_i^{l_i-1}}{\Gamma(a) [\prod_{i=1}^{p} \Gamma(l_i)] (1+\sum_{i=1}^{p} x_i)^{\sum_{i=1}^{p} l_i + a}},

where xi>0,a>0,li>0,i=1,,px_i>0, a>0, l_i>0, i=1,\cdots, p.

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is obtained by multiple integral

F(x1,,xk)=0x10xkf(y1,,yk)dykdy1.F(x_1, \dots, 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 qq through the built-in one dimension root finding function uniroot:

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

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

Fˉ(x1,,xk)=1+SS(1)SFS(xj,jS),\bar{F}(x_1, \cdots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} F_S(x_j, j \in S),

or via Monte Carlo method.

Random numbers X1,,XkX_1, \cdots, X_k from multivariate inverted beta distribution can be generated through parameter substitutions in simulation of generalized multivariate Lomax distribution by letting θi=1,i=1,,k\theta_i = 1, i = 1, \cdots, k.

Value

dmvinvbeta gives the numerical values of the probability density.

pmvinvbeta 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"

qmvinvbeta 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").

rmvinvbeta generates random numbers.

smvinvbeta 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"

References

Balakrishnan, N. and Lai, C. (2009). Continuous Bivariate Distributions. 2nd Edition. New York: Springer.

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

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.

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the multivariate inverted beta with parameters:
# a = 7, l1 = 1, l2 = 3
# Vector of quantiles: c(2, 4)

dmvinvbeta(x = c(2, 4), parm1 = 7, parm2 = c(1, 3)) # Density

# Cumulative Probability using adaptive multivariate integral
pmvinvbeta(q = c(2, 4), parm1 = 7, parm2 = c(1, 3))


# Cumulative Probability using Monte Carlo method
pmvinvbeta(q = c(2, 4), parm1 = 7, parm2 = c(1, 3), algorithm = "MC")


# Equicoordinate quantile of cumulative probability 0.5
qmvinvbeta(p = 0.5, parm1 = 7, parm2 = c(1, 3))

# Random numbers generation with sample size 100
rmvinvbeta(n = 100, parm1 = 7, parm2 = c(1, 3))

smvinvbeta(q = c(2, 4), parm1 = 7, parm2 = c(1, 3)) # Survival function

Multivariate Logistic Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for multivariate logistic distribution with vector parameter parm1 and vector parameter parm2.

Usage

dmvlogis(x, parm1 = rep(1, k), parm2 = rep(1, k), log = FALSE)

pmvlogis(q, parm1 = rep(1, k), parm2 = rep(1, k))

qmvlogis(p, parm1 = rep(1, k), parm2 = rep(1, k), interval = c(0, 1e+08))

rmvlogis(n, parm1 = rep(1, k), parm2 = rep(1, k))

smvlogis(q, parm1 = rep(1, k), parm2 = rep(1, k))

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm1

a vector of location parameters, see parameter μi\mu_i in Details.

parm2

a vector of scale parameters, see parameters σi\sigma_i in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

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 c(0, 1e8).

n

number of observations.

k

dimension of data or number of variates.

Details

Bivariate logistic distribution was introduced by Gumbel (1961) and its multivariate generalization was given by Malik and Abraham (1973) as

f(x1,,xk)=k!exp(i=1kxiμiσi)[i=1pσi][1+i=1kexp(xiμiσi)]1+k,f(x_1, \cdots, x_k) = \frac{k! \exp{(-\sum_{i=1}^{k} \frac{x_i - \mu_i}{\sigma_i})}}{[\prod_{i=1}^{p} \sigma_i] [1 + \sum_{i=1}^{k} \exp{(-\frac{x_i - \mu_i}{\sigma_i})}]^{1+k}},

where <xi,μi<,σi>0,i=1,,k-\infty<x_i, \mu_i<\infty, \sigma_i > 0, i=1,\cdots, k.

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is given as

F(x1,,xk)=[1+i=1kexp(xiμiσi)]1.F(x_1, \cdots, x_k) = \left[1 + \sum_{i=1}^{k} \exp(-\frac{x_i-\mu_i}{\sigma_i})\right]^{-1}.

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

qqf(x1,,xk)dxkdx1=p,\int_{-\infty}^{q} \cdots \int_{-\infty}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

The survival function Fˉ(x1,,xk)\bar{F}(x_1, \cdots, x_k) is obtained by the following formula related to cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) (Joe, 1997)

Fˉ(x1,,xk)=1+SS(1)SFS(xj,jS).\bar{F}(x_1, \cdots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} F_S(x_j, j \in S).

Random numbers X1,,XkX_1, \cdots, X_k from multivariate logistic distribution can be generated through transformation of multivariate Lomax random variables Y1,,YkY_1, \cdots, Y_k by letting Xi=μiσiln(θiYi),i=1,,kX_i=\mu_i-\sigma_i\ln(\theta_i Y_i), i = 1, \cdots, k; see Nayak (1987).

Value

dmvlogis gives the numerical values of the probability density.

pmvlogis gives the cumulative probability.

qmvlogis gives the equicoordinate quantile.

rmvlogis generates random numbers.

smvlogis gives the value of survival function

References

Gumbel, E.J. (1961). Bivariate logistic distribution. J. Am. Stat. Assoc., 56, 335-349.

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

Malik, H. J. and Abraham, B. (1973). Multivariate logistic distributions. Ann. Statist. 3, 588-590.

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

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the multivariate logistic distribution with parameters:
# mu1 = 0.5, mu2 = 1, mu3 = 2, sigma1 = 1, sigma2 = 2 and sigma3 = 3
# Vector of quantiles: c(3, 2, 1)

dmvlogis(x = c(3, 2, 1), parm1 = c(0.5, 1, 2), parm2 = c(1, 2, 3)) # Density

pmvlogis(q = c(3, 2, 1), parm1 = c(0.5, 1, 2), parm2 = c(1, 2, 3)) # Cumulative Probability

# Equicoordinate quantile of cumulative probability 0.5
qmvlogis(p = 0.5, parm1 = c(0.5, 1, 2), parm2 = c(1, 2, 3))

# Random numbers generation with sample size 100
rmvlogis(n = 100, parm1 = c(0.5, 1, 2), parm2 = c(1, 2, 3)) 

smvlogis(q = c(3, 2, 1), parm1 = c(0.5, 1, 2), parm2 = c(1, 2, 3)) # Survival function

Multivariate Lomax (Pareto Type II) Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for multivariate Lomax (Pareto Type II) distribution with a scalar parameter parm1 and vector parameter parm2.

Usage

dmvlomax(x, parm1 = 1, parm2 = rep(1, k), log = FALSE)

pmvlomax(q, parm1 = 1, parm2 = rep(1, k))

qmvlomax(p, parm1 = 1, parm2 = rep(1, k), interval = c(0, 1e+08))

rmvlomax(n, parm1 = 1, parm2 = rep(1, k))

smvlomax(q, parm1 = 1, parm2 = rep(1, k))

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm1

a scalar parameter, see parameter aa in Details.

parm2

a vector of parameters, see parameters θi\theta_i in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

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 c(0, 1e8).

n

number of observations.

k

dimension of data or number of variates.

Details

Multivariate Lomax (Pareto type II) distribution was introduced by Nayak (1987) as a joint probability distribution of several skewed positive random variables X1,X2,,XkX_1, X_2, \cdots, X_k. Its probability density function is given by

f(x1,x2,,xk)=[i=1kθi]a(a+1)(a+k1)(1+i=1kθixi)a+k,f(x_1, x_2, \dots, x_k) = \frac{[ \prod_{i=1}^{k} \theta_i] a(a+1) \cdots (a+k-1)}{(1+\sum_{i=1}^{k} \theta_i x_i)^{a+k}},

where xi>0,a>0,θi>0,i=1,,kx_i > 0, a>0, \theta_i>0, i=1,\dots,k.

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is obtained by the following formula related to survival function Fˉ(x1,,xk)\bar{F}(x_1, \dots, x_k) (Joe, 1997)

F(x1,,xk)=1+SS(1)SFˉS(xj,jS),F(x_1, \dots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} \bar{F}_S(x_j, j \in S),

where the survival function is given by

Fˉ(x1,,xk)=(1+i=1kθixi)a.\bar{F}(x_1, \dots, x_k) = ( 1+\sum_{i=1}^{k} \theta_i x_i )^{-a}.

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

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

Random numbers from multivariate Lomax distribution can be generated by simulating kk independent exponential random variables having a common environment parameter following gamma distribution with shape parameter aa and scale parameter 11; see Nayak (1987).

Value

dmvlomax gives the numerical values of the probability density.

pmvlomax gives the cumulative probability.

qmvlomax gives the equicoordinate quantile.

rmvlomax generates random numbers.

smvlomax gives the value of survival function.

References

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

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

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the multivariate Lomax with parameters: 
# a = 5, theta1 = 1, theta2 = 2 and theta3 = 3.
# Vector of quantiles: c(3, 2, 1)

dmvlomax(x = c(3, 2, 1), parm1 = 5, parm2 = c(1, 2, 3)) # Density

pmvlomax(q = c(3, 2, 1), parm1 = 5, parm2 = c(1, 2, 3)) # Cumulative Probability

# Equicoordinate quantile of cumulative probability 0.5
qmvlomax(p = 0.5, parm1 = 5, parm2 = c(1, 2, 3)) 

# Random numbers generation with sample size 100
rmvlomax(n = 100, parm1 = 5, parm2 = c(1, 2, 3)) 

smvlomax(q = c(3, 2, 1), parm1 = 5, parm2 = c(1, 2, 3)) # Survival function

Mardia's Multivariate Pareto Type I Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for Mardia's multivariate Pareto Type I distribution with a scalar parameter parm1 and a vector of parameters parm2.

Usage

dmvmpareto1(x, parm1 = 1, parm2 = rep(1, k), log = FALSE)

pmvmpareto1(q, parm1 = 1, parm2 = rep(1, k))

qmvmpareto1(
  p,
  parm1 = 1,
  parm2 = rep(1, k),
  interval = c(max(1/parm2) + 1e-08, 1e+08)
)

rmvmpareto1(n, parm1 = 1, parm2 = rep(1, k))

smvmpareto1(q, parm1 = 1, parm2 = rep(1, k))

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm1

a scalar parameter, see parameter aa in Details.

parm2

a vector of parameters, see parameters θi\theta_i in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

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 c(max(1 / parm2) + 1e-8, 1e8) according to xi>1/θi,θi>0,i=1,,kx_i > 1 / \theta_i, \theta_i>0, i=1,\cdots, k.

n

number of observations.

k

dimension of data or number of variates.

Details

Multivariate Pareto type I distribution was introduced by Mardia (1962) as a joint probability distribution of several nonnegative random variables X1,,XkX_1, \cdots, X_k. Its probability density function is given by

f(x1,,xk)=[i=1kθi]a(a+1)(a+k1)(i=1kθixik+1)a+k,f(x_1, \cdots, x_k) = \frac{[ \prod_{i=1}^{k} \theta_i] a(a+1) \cdots (a+k-1)}{(\sum_{i=1}^{k} \theta_i x_i - k + 1)^{a+k}},

where xi>1/θi,a>0,θi>0,i=1,,kx_i > 1 / \theta_i, a >0, \theta_i>0, i=1,\cdots, k.

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is obtained by the following formula related to survival function Fˉ(x1,,xk)\bar{F}(x_1, \dots, x_k) (Joe, 1997)

F(x1,,xk)=1+SS(1)SFˉS(xj,jS),F(x_1, \dots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} \bar{F}_S(x_j, j \in S),

where the survival function is given by

Fˉ(x1,,xk)=(i=1kθixik+1)a.\bar{F}(x_1, \cdots, x_k) = \left( \sum_{i=1}^{k} \theta_i x_i - k + 1 \right)^{-a}.

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

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

Random numbers X1,,XkX_1, \cdots, X_k from Mardia's multivariate Pareto type I distribution can be generated through linear transformation of multivariate Lomax random variables Y1,,YkY_1, \cdots, Y_k by letting Xi=Yi+1/θi,i=1,,kX_i = Y_i + 1/\theta_i, i = 1, \cdots, k; see Nayak (1987).

Value

dmvmpareto1 gives the numerical values of the probability density.

pmvmpareto1 gives the cumulative probability.

qmvmpareto1 gives the equicoordinate quantile.

rmvmpareto1 generates random numbers.

smvmpareto1 gives the value of survival function.

References

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

Mardia, K. V. (1962). Multivariate Pareto distributions. Ann. Math. Statist. 33, 1008-1015.

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

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the Mardia's multivariate Pareto Type I with parameters:
# a = 5, theta1 = 1, theta2 = 2, theta3 = 3
# Vector of quantiles: c(2, 1, 1)

dmvmpareto1(x = c(2, 1, 1), parm1 = 5, parm2 = c(1, 2, 3)) # Density

pmvmpareto1(q = c(2, 1, 1), parm1 = 5, parm2 = c(1, 2, 3)) # Cumulative Probability

# Equicoordinate quantile of cumulative probability 0.5
qmvmpareto1(p = 0.5, parm1 = 5, parm2 =  c(1, 2, 3))

# Random numbers generation with sample size 100
rmvmpareto1(n = 100, parm1 = 5, parm2 = c(1, 2, 3)) 

smvmpareto1(q = c(2, 1, 1), parm1 = 5, parm2 = c(1, 2, 3)) # Survival function

Cook-Johnson's Multivariate Uniform Distribution

Description

Calculation of density function, cumulative distribution function, equicoordinate quantile function and survival function, and random numbers generation for Cook-Johnson’s multivariate uniform distribution with a scalar parameter parm.

Usage

dmvunif(x, parm = 1, log = FALSE)

pmvunif(q, parm = 1)

qmvunif(p, parm = 1, dim = k, interval = c(0, 1))

rmvunif(n, parm = 1, dim = 1)

smvunif(q, parm = 1)

Arguments

x

vector or matrix of quantiles. If xx is a matrix, each row vector constitutes a vector of quantiles for which the density f(x)f(x) is calculated (for ii-th row xix_i, f(xi)f(x_i) is reported).

parm

a scalar parameter, see parameter aa in Details.

log

logical; if TRUE, probability densities ff are given as log(f)log(f).

q

a vector of quantiles.

p

a scalar value corresponding to probability.

dim

dimension of data or number of variates (k).

interval

a vector containing the end-points of the interval to be searched. Default value is set as c(0, 1).

n

number of observations.

Details

Multivariate uniform distribution of Cook and Johnson (1981) is a joint distribution of uniform variables over (0,1](0,1] and its probability density is given as

f(x1,,xk)=Γ(a+k)Γ(a)aki=1kxi(1/a)1[i=1kxi1/ak+1](a+k),f(x_1, \cdots, x_k) = \frac{\Gamma(a+k)}{\Gamma(a)a^k}\prod_{i=1}^{k} x_i^{(-1/a)-1} \left[\sum_{i=1}^{k} x_i^{-1/a} - k +1 \right]^{-(a+k)},

where 0<xi<=1,a>0,i=1,,k0 < x_i <=1, a>0, i=1,\cdots, k. In fact, Cook-Johnson's uniform distribution is also called Clayton copula (Nelsen, 2006).

Cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) is given as

F(x1,,xk)=[i=1kxi1/ak+1]a.F(x_1, \cdots, x_k) = \left[ \sum_{i=1}^{k} x_i^{-1/a} - k + 1 \right]^{-a}.

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

0q0qf(x1,,xk)dxkdx1=p,\int_{0}^{q} \cdots \int_{0}^{q} f(x_1, \cdots, x_k) dx_k \cdots dx_1 = p,

where pp is the given cumulative probability.

The survival function Fˉ(x1,,xk)\bar{F}(x_1, \cdots, x_k) is obtained by the following formula related to cumulative distribution function F(x1,,xk)F(x_1, \dots, x_k) (Joe, 1997)

Fˉ(x1,,xk)=1+SS(1)SFS(xj,jS).\bar{F}(x_1, \cdots, x_k) = 1 + \sum_{S \in \mathcal{S}} (-1)^{|S|} F_S(x_j, j \in S).

Random numbers X1,,XkX_1, \cdots, X_k from Cook-Johnson’s multivariate uniform distribution can be generated through transformation of multivariate Lomax random variables Y1,,YkY_1, \cdots, Y_k by letting Xi=(1+θiYi)a,i=1,,kX_i = (1+\theta_i Y_i)^{-a}, i = 1, \cdots, k; see Nayak (1987).

Value

dmvunif gives the numerical values of the probability density.

pmvunif gives the cumulative probability.

qmvunif gives the equicoordinate quantile.

rmvunif generates random numbers.

smvunif gives the value of survival function.

References

Cook, R. E. and Johnson, M. E. (1981). A family of distributions for modeling non-elliptically symmetric multivariate data. J.R. Statist. Soc. B 43, No. 2, 210-218.

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

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

Nelsen, R. B. (2006). An Introduction to Copulas, Second Edition. New York: Springer.

See Also

uniroot for one dimensional root (zero) finding.

Examples

# Calculations for the Cook-Johnson's multivariate uniform distribution with parameters:
# a = 2, dim = 3
# Vector of quantiles: c(0.8, 0.5, 0.2)

dmvunif(x = c(0.8, 0.5, 0.2), parm = 2) # Density

pmvunif(q = c(0.8, 0.5, 0.2), parm = 2) # Cumulative Probability

# Equicoordinate quantile of cumulative probability 0.5
qmvunif(p = 0.5, parm = 2, dim = 3)

# Random numbers generation with sample size 100
rmvunif(n = 100, parm = 2, dim = 3)

smvunif(q = c(0.8, 0.5, 0.2), parm = 3) # Survival function