Method to generate multivariate parameters with elliptical copulas and triangular marginals for a4aGr objects.

# S4 method for numeric,a4aGr
mvrtriangle(n = 1, object, ...)

Arguments

n

the number of iterations

object

object of relevant class (see signature of method)

...

additional argument list that might never be used

Value

an a4aGr object with n iterations

Details

The method is essentially a special case of mvrcop, where the copula is of type "ellipCopula" and family "t", and where the marginals are triangular.

Examples

# Set up the a4aGr object and parameters for the marginals
mm <- matrix(NA, ncol=3, nrow=3)
diag(mm) <- c(50, 0.001,0.001)
mm[upper.tri(mm)] <- mm[lower.tri(mm)] <- c(0.1,0.01,0.00004)
md <- ~linf*(1-exp(-k*(t-t0)))
imd <- ~t0-1/k*log(1-len/linf)
prs <- FLPar(linf=58.5, k=0.086, t0=0.001, units=c("cm","yr^-1","yr"))
vbObj <- a4aGr(grMod=md, grInvMod=imd, params=prs, vcov=mm, distr="norm")
pars <- list(list(a=50, b=100, c=58.5), list(a=0.06, b=0.2, c=0.086), list(a=0, b=0.005, c=0.001))

# Note that mvrtriangle is a special case of mvrcop
set.seed(1)
vbObj1 <- mvrtriangle(10000, vbObj, paramMargins=pars, dispstr="ex", param=0)
#> Warning: margins correct? Currently, have no function(s) named: ptriangle
#> Warning: margins correct? Currently, have no function(s) named: dtriangle
#> Error in qtriangle(x, a = 50, b = 100, c = 58.5): could not find function "qtriangle"
set.seed(1)
vbObj2 <- mvrcop(10000, vbObj, copula="ellipCopula", family="t", 
  param=0, margins="triangle", paramMargins=pars)
#> Warning: margins correct? Currently, have no function(s) named: ptriangle
#> Warning: margins correct? Currently, have no function(s) named: dtriangle
#> Error in qtriangle(x, a = 50, b = 100, c = 58.5): could not find function "qtriangle"
all.equal(vbObj2, vbObj1)
#> Error in all.equal(vbObj2, vbObj1): object 'vbObj2' not found