pprodt2 | R Documentation |
Consider the product W=X_1 X_2
from a bivariate random variable
(X_1, X_2)
having joint normal or Student's t distribution,
with 0 location and unit scale parameters.
Functions are provided for the distribution function of W
in the
normal and the t case, and the quantile function for the t case.
pprodn2(x, rho)
pprodt2(x, rho, nu)
qprodt2(p, rho, nu, tol=1e-5, trace=0)
x |
a numeric vector |
p |
a numeric vector of probabilities |
rho |
a scalar value representing the correlation (or the matching term in the t case when correlation does not exists) |
nu |
a positive scalar representing the degrees of freedom |
tol |
the desired accuracy (convergence tolerance),
passed to function |
trace |
integer number for controlling tracing information,
passed on to |
Function pprodt2
implements formulae in Theorem 1 of Wallgren (1980).
Corresponding quantiles are obtained by qprodt2
by solving the
pertaining non-linear equations with the aid of uniroot
,
one such equation for each element of p
.
Function pprodn2
implements results for the central case in
Theorem 1 of Aroian et al. (1978).
a numeric vector
Adelchi Azzalini
Aroian, L.A., Taneja, V.S, & Cornwell, L.W. (1978). Mathematical forms of the distribution of the product of two normal variables. Communications in statistics. Theory and methods, 7, 165-172
Wallgren, C. M. (1980). The distribution of the product of two correlated t variates. Journal of the American Statistical Association, 75, 996-1000
uniroot
p <- pprodt2(-3:3, 0.5, 8)
qprodt2(p, 0.5, 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.