fitseq: Choose sequence of variables to link

Description Usage Arguments Details Value Examples

View source: R/fitseq.R

Description

Chooses the sequence of variables that link up with another variable in the order of highest to lowest partial correlation, as approximated by lm(). Intended to internal use. Use fitseq_rvine if you want the order to be chosen so that, when attached to a base rvine, you end up with an rvine still (NOT FUNCTIONAL).

Usage

1
2
3
fitseq(dat, var, linkwith = (1:ncol(dat))[-var], a = NULL)

fitseq_rvine(dat, var, linkwith = (1:ncol(dat))[-var], a = NULL, A)

Arguments

dat

Matrix of data with Unif(0,1) margins

var

Integer; the variable you want to link.

linkwith

Integer vector; the variables you want to link up var with.

a

Vector of a pre-specified vine array column, if you know some of it. Should start with var, and have NA for blank spots.

A

Vine array matrix containing variables in linkwith and a[-1] (to ensure the order is chosen to preserve the rvine status).

Details

All variables in linkwith will be linked, despite what's in a.

Value

Vector of the variable sequence, with var first.

Examples

1
2
3
4
set.seed(123)
dat <- matrix(runif(50), ncol=5)
fitseq(dat, 1, 3:5)
fitseq(dat, 1, 2:5, a=c(1,NA,4))

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