Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nacTiming

Timing for Sampling Frailties of Nested Archimedean Copulas


Description

This function provides measurements of user run times for the frailty variables involved in a nested Archimedean copula.

Usage

nacFrail.time(n, family, taus, digits = 3, verbose = FALSE)

Arguments

n

integer specifying the sample size to be used for the random variates V0 and V01.

family

the Archimedean family (class "acopula") for which V0 and V01 are sampled.

taus

numeric vector of Kendall's taus. This vector is converted to a vector of copula parameters theta, which then serve as theta0 and theta1 for a three-dimensional fully nested Archimedean copula of the specified family. First, for each theta0, n random variates V0 are generated. Then, given the particular theta0 and the realizations V0, n random variates V01 are generated for each theta1 fulfilling the sufficient nesting condition; see paraConstr in acopula.

digits

number of digits for the output.

verbose

logical indicating if nacFrail.time output should generated while the random variates are generated (defaults to FALSE).

Value

A k x k matrix of user run time measurements in milliseconds (1000*system.time(.)[1]) where k is length(taus). The first column contains the run times for generating the V0s. For the submatrix that remains if the first column is removed, row i (for theta0[i]) contains the run times for the V01s for a particular theta0 and all the admissible theta1s.

See Also

The class acopula and our predefined "acopula" family objects in acopula-families. For some timings on a standard notebook, see demo(timings) (or the file ‘timings.R’ in the demo folder).

Examples

## takes about 7 seconds:% so we rather test a much smaller set in R CMD check

nacFrail.time(10000, "Gumbel", taus=  c(0.05,(1:9)/10, 0.95))

system.time(
print( nacFrail.time(1000,  "Gumbel", taus = c(0.5,1,6,9)/10) )
)

copula

Multivariate Dependence with Copulas

v1.0-1
GPL (>= 3) | file LICENCE
Authors
Marius Hofert [aut] (<https://orcid.org/0000-0001-8009-4665>), Ivan Kojadinovic [aut] (<https://orcid.org/0000-0002-2903-1543>), Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Jun Yan [aut] (<https://orcid.org/0000-0003-4401-7296>), Johanna G. Nešlehová [ctb] (evTestK(), <https://orcid.org/0000-0001-9634-4796>), Rebecca Morger [ctb] (fitCopula.ml(): code for free mixCopula weight parameters)
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.