Description Usage Arguments Details Value Examples
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.
1 2 3 4 5 6 7 8 9 10 11 |
Y |
the response vector |
K_select |
list of selected kernel |
constraints |
list of quadratic matrices modeling the selection of the
kernels in |
method |
test statistic. Must be one of the following: |
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
|
burn_in |
number of burn_in iteration in |
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.
$p$-values for the chosen methods
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.