fitlayer: Fit a new layer

Description Usage Arguments Details Value Note

View source: R/fitlayer.R

Description

Choose and fit copula models on a new layer. The edge ("array column") must be pre-specified. Intended for internal use.

Usage

1
2
3
4
5
6
7
8
9
fitlayer(
  dat,
  basevine,
  edges,
  cops = NULL,
  cpars = NULL,
  families = c("indepcop", "bvncop", "bvtcop", "mtcj", "gum", "frk", "joe", "bb1",
    "bb7", "bb8")
)

Arguments

dat

Data matrix with Uniform margins.

basevine

Object of type "rvine" of the already-fit base vine for which the new layer is to be applied.

edges

Vector – new column of vine array (with node appearing first)

cops

Vector or list of pre-specified copula families for each edge. Put NA to leave the edge unspecified. NULL for fully unspecified. You're allowed to put more than one family as candidates.

cpars

Pre-specified copula parameters corresponding to some of the specified copulas in cops. Put NA in place of parameters to leave them unspecified. NULL for fully unspecified.

families

Vector of candidate copula family names for those that are NA or NULL.

Details

Edges are fit so that edges[1] is the "V" variable. So, copulas are fit to (edges[2], edges[1]), then (edges[3], edges[1]) | edges[2], etc. That's because when computing edges[1]|others, "pcond" can be used instead of "pcond12".

Value

List of fitted $cops and $cpars.

Note

Expecting smart input. So, ensure that edges has length at least 2, and that edges[-1] are variables in basevine, and that cpars are only specified when there's only one copula family to choose from.


vincenzocoia/copsupp documentation built on Aug. 23, 2020, 7:37 a.m.