SPH: Random Generation for General Spherically Symmetric...

Description Usage Arguments Value References Examples

View source: R/function.R

Description

Generate univariate or multivariate random sample for general spherically symmetric distributions.

Usage

1
SPH(n, p, D, ...)

Arguments

n

number of rows (observations).

p

number of columns (variables).

D

random generation functions for some distributions (e.g., rgamma, rbeta).

...

optional arguments passed to D.

Value

Returns univariate (p=1) or multivariate (p>1) random sample matrix.

References

Chmielewski, M. A. (1981). Elliptically symmetric distributions: A review and bibliography. International Statistical Review/Revue Internationale de Statistique, 67-74.

Henze, N., & Zirkler, B. (1990). A class of invariant consistent tests for multivariate normality. Communications in statistics-Theory and Methods, 19(10), 3595-3617.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(12345)

## Generate 5X2 random sample matrix from SPH(Beta(1,1)) ##
SPH(n=5, p=2, D=rbeta, shape1=1, shape2=1)


## Power calculation against bivariate (p=2) SPH(Beta(1,1)) distribution ##
## at sample size n=50 at one-sided alpha = 0.05 ##

# Zhou-Shao's test #
power.mvnTest(a=0.05, n=50, p=2, B=100, FUN=SPH, D=rbeta, shape1=1, shape2=1)

mvnormalTest documentation built on April 28, 2020, 5:06 p.m.