rnacModel {copula}R Documentation

Random nacopula Model

Description

Randomly construct a nested Archimedean copula model,

Usage

rnacModel(family, d, pr.comp, rtau0 = function() rbeta(1, 2,4),
          order=c("random", "each", "seq"), digits.theta = 2)

Arguments

family

the Archimedean family

d

integer >=2; the dimension

pr.comp

probability of a direct component on each level

rtau0

a function to generate a (random) tau, corresponding to theta0, the outermost theta.

order

string indicating how the component IDs are selected.

digits.theta

integer specifying the number of digits to round the theta values.

Value

an object of outer_nacopula.

See Also

rnacopula for generating d-dimensional observations from an (outer) nacopula, e.g., from the result of rnacModel().

Examples

## Implicitly tests the function {with validity of outer_nacopula ..}
set.seed(11)
for(i in 1:40) {
  m1 <- rnacModel("Gumbel", d=sample(20:25, 1), pr.comp = 0.3,
		  rtau0 = function() 0.25)
  m2 <- rnacModel("Joe", d=3, pr.comp = 0.1, order="each")
  mC <- rnacModel("Clayton", d=20, pr.comp = 0.3,
		  rtau0 = function() runif(1, 0.1, 0.5))
  mF <- rnacModel("Frank", d=sample(20:25, 1), pr.comp = 0.3, order="seq")
}

[Package copula version 1.1-3 Index]