mvrtriangle-a4aGr: mvrtriangle

mvrtriangle for a4aGrR Documentation

mvrtriangle

Description

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

Usage

## S4 method for signature '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

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.

Value

an a4aGr object with n iterations

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)
set.seed(1)
vbObj2 <- mvrcop(10000, vbObj, copula="ellipCopula", family="t", 
	param=0, margins="triangle", paramMargins=pars)
all.equal(vbObj2, vbObj1)

flr/FLa4a documentation built on June 4, 2023, 11:05 a.m.