adaQ: models the forward selection of the kernels for the adaptive...

Description Usage Arguments Value References Examples

View source: R/RcppExports.R

Description

Similarly to the fixed variant, the adaptive selection of the kernels in a forward fashion can also be modeled with a set of quadratic constraints. The constraints for adaptive selection can be split into two subsets. The first subset encodes the order of selection of the kernels, while the second subset encodes the selection of the number of the kernels. The two subsets are equally sized (length(K) - 1) and are sequentially included in the output list.

Usage

1
adaQ(K, select, n)

Arguments

K

list kernel similarity matrices

select

integer vector containing the order of selection of the kernels in K. Typically, the selection field of the output of FOHSIC.

n

number of selected kernels. Typically, the n field of the output of adaFOHSIC.

Value

list of matrices modeling the quadratic constraints of the adaptive selection event

References

Loftus, J. R., & Taylor, J. E. (2015). Selective inference in regression models with groups of variables.

Examples

1
2
3
4
5
6
7
8
n <- 50
p <- 20
K <- replicate(8, matrix(rnorm(n*p), nrow = n, ncol = p), simplify = FALSE)
K <-  sapply(K, function(X) return(X %*% t(X) / dim(X)[2]), simplify = FALSE)
L <- matrix(rnorm(n*p), nrow = n, ncol = p)
L <-  L %*% t(L) / p
adaS <- adaFOHSIC(K, L)
listQ <- adaQ(K, select = adaS[["selection"]], n = adaS[["n"]])

kernelPSI documentation built on Dec. 8, 2019, 1:07 a.m.