default.target.fused: Generate data-driven targets for fused ridge estimation

View source: R/rags2ridgesFused.R

default.target.fusedR Documentation

Generate data-driven targets for fused ridge estimation

Description

Generates a list of (data-driven) targets to use in fused ridge estimation. Simply a wrapper for default.target.

Usage

default.target.fused(Slist, ns, type = "DAIE", by, ...)

Arguments

Slist

A list of length K of numeric covariance matrices of the same size for K classes.

ns

A numeric vector of sample sizes corresponding to the entries of Slist.

type

A character giving the choice of target to construct. See default.target for the available options. Default is "DAIE".

by

A character vector with the same length as Slist specifying which groups should share target. For each unique entry of by a target is constructed. If omitted, the default is to assign a unique target to each class. If not given as a character coercion into one is attempted.

...

Arguments passed to default.target.

Value

A list of K covariance target matrices of the same size.

Author(s)

Anders E. Bilgrau, Carel F.W. Peeters <carel.peeters@wur.nl>, Wessel N. van Wieringen

See Also

default.target

Examples

# Make some toy data
ns <- c(3, 4)  # Two classes with sample size 3 and 4
Slist <- createS(ns, p = 3)  # Generate two 3-dimensional covariance matrices
Slist

# Different choices:
default.target.fused(Slist, ns)
default.target.fused(Slist, ns, by = seq_along(Slist)) # The same as before
default.target.fused(Slist, ns, type = "Null")
default.target.fused(Slist, ns, type = "DAPV")
default.target.fused(Slist, ns, type = "DAPV", by = rep(1, length(Slist)))


# Make some (more) toy data
ns <- c(3, 4, 6, 7)  # Two classes with sample size 3 and 4
Slist <- createS(ns, p = 2)  # Generate four 2-dimensional covariance matrices

# Use the same target in class 1 and 2, but another in class 3 and 4:
default.target.fused(Slist, ns, by = c("A", "A", "B", "B"))


rags2ridges documentation built on Oct. 14, 2023, 5:06 p.m.