kernelPSI: computes a valid significance value for the effect of the...

Description Usage Arguments Details Value Examples

View source: R/statistic.R

Description

In this function, we compute an empirical p-value for the effect of a subset of kernels on the outcome. A number of statistics are supported in this function : ridge regression, kernel PCA and the HSIC criterion. The p-values are determined by comparing the statistic of the original response vector to those of the replicates. We use the sampleH function to sample replicates of the response in the acceptance region of the selection event.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
kernelPSI(
  Y,
  K_select,
  constraints,
  method = "all",
  mu = 0,
  sigma = 1,
  lambda = 1,
  n_replicates = 5000,
  burn_in = 1000
)

Arguments

Y

the response vector

K_select

list of selected kernel

constraints

list of quadratic matrices modeling the selection of the kernels in K_select

method

test statistic. Must be one of the following: ridge for log-likelihood ratio for ridge regression, pca for log-likelihood for kernel PCA, hsic for HSIC measures, or all to obtain significance values for all three former methods.

mu

mean of the response

sigma

standard deviation of the response

lambda

regularization parameter for ridge regression.

n_replicates

number of replicates for the hit-and-run sampler in sampleH

burn_in

number of burn_in iteration in sampleH

Details

For valid inference on hundreds of samples, we recommend setting the number of replicates to 50000 and the number of burn-in iterations to 10000. These ranges are to be increased for higher sample sizes.

Value

$p$-values for the chosen methods

Examples

1
2
3
4
5
6
7
8
9
n <- 30
p <- 20
K <- replicate(5, matrix(rnorm(n*p), nrow = n, ncol = p), simplify = FALSE)
K <-  sapply(K, function(X) return(X %*% t(X) / dim(X)[2]), simplify = FALSE)
Y <- rnorm(n)
L <- Y %*% t(Y)
selectK <- FOHSIC(K, L, mKernels = 2)
constraintFO <- forwardQ(K, selectK)
kernelPSI(Y, K[selectK], constraintFO, method = "ridge")

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