copulas: Random Generation for the Copula Generated Distributions

Description Usage Arguments Value References Examples

View source: R/function.R

Description

Generate univariate or multivariate random sample for the Copula Generated Distributions.

Usage

1
copulas(n, p, c = "clayton", param, invF, ...)

Arguments

n

number of rows (observations).

p

total number of columns (variables).

c

name of an Archimedean copula, choosing from "clayton" (default), "frank", or "gumbel".

param

number (numeric) specifying the copula parameter.

invF

inverse function (quantile function, e.g. qnorm).

...

optional arguments passed to invF.

Value

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

References

Yan, J. (2007). Enjoy the joy of copulas: with a package copula. Journal of Statistical Software, 21(4), 1-21.

Examples

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

## Generate 5X2 random sample matrix from Clayton(0.5, qnorm) ##
copulas(n=50, p=2, c="clayton", param=0.5, invF=qnorm)


## Power calculation against bivariate (p=2) Clayton(0.5, qnorm) 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=copulas, c="clayton", param=0.5, invF=qnorm)

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