Learn R Programming

copBasic (version 1.5.1)

simcompositeCOP: Simulation of a Composited Copula

Description

This function simulates and provides plotting features for a composited copula through composition by various methods.

Usage

simcompositeCOP(n=1000, nsim=100, compositor=composite2COP,
                parents=NULL, ploton=FALSE, points=FALSE,
                showpar=FALSE, showresults=FALSE, digits=6, ...)

Arguments

n
Sample size per simulation,
nsim
Number of simulations to perform,
compositor
The compositing function, could be composite1COP or composite2COP,
parents
A special parameter list() (see Note),
ploton
A logical to toggle on intermediate plotting,
points
A logical to actually draw the simulations on the ploton by points(),
showpar
Print the simulated parameter set with each iteration,
showresults
Print the results (useful if harvest results from a batch operation of R),
digits
The number digits to pass to round if showresults is true, and
...
Additional arguments to pass.

Value

  • A matrix of results is returned. Each row represents a simulation run. The first two columns are the $\alpha$ and $\beta$ parameters and are labeled as such. The next two columns are the opposing diagonals, by first row and then second, of the L-comoment correlation. The following two columns are the opposing diagnonals, by row and then second, of the L-coskew. The L-comoment columns are labeled as such, T2.21 means the L-comoment correlation row 2 column 1 and T3.12 mean the L-coskew row 1 column 2. The remaining columns represent the $n$ parameters for copula 1, the $m$ parameters for copula 2. The columns are labeled Cop1Thetas or Cop2Thetas.

See Also

composite1COP, composite2COP

Examples

Run this code
mainpara <- list(cop1=PLACKETTcop,
                 cop2=PLACKETTcop,
                 para1gen=function() {
                       return(c(10^runif(1,min=-5,max=0))) },
                 para2gen=function() {
                       return(c(10^runif(1,min=0,max=5))) })

v <- simcompositeCOP(n=200, nsim=1, parent=mainpara, showresults=TRUE)
print(v)

Run the code above in your browser using DataLab