ridge.proj {hdi} | R Documentation |
P-values based on ridge projection method
Description
Compute p-values for lasso-type regression coefficients based on the ridge projection method.
Usage
ridge.proj(x, y, family = "gaussian", standardize = TRUE,
lambda = 1, betainit = "cv lasso", sigma = NULL,
suppress.grouptesting = FALSE,
multiplecorr.method = "holm", N = 10000)
Arguments
x |
design matrix (without intercept). |
y |
response vector. |
family |
family |
standardize |
Should design matrix be standardized to unit column standard deviation (logical)? |
lambda |
Value of penalty parameter lambda (ridge regression). |
betainit |
Either a numeric vector, corresponding to a sparse estimate of the coefficient vector, or the method to be used for the initial estimation, "scaled lasso" or "cv lasso". |
sigma |
Estimate of the standard deviation of the error term. This estimate needs to be compatible with the initial estimate (see betainit) provided or calculated. Otherwise, results won't be correct. |
suppress.grouptesting |
A boolean to optionally suppress the preparations made for testing groups. This will avoid quite a bit of computation and memory usage. The output will also be smaller. |
multiplecorr.method |
Either "WY" or any of
|
N |
number of empirical samples (only used if
|
Value
pval |
Individual p-values for each parameter. |
pval.corr |
Multiple testing corrected p-values for each parameter. |
groupTest |
Function to perform groupwise tests. Groups are
indicated using an index vector with entries in |
clusterGroupTest |
Function to perform groupwise tests based on
hierarchical clustering. You can either provide a distance matrix
and clustering method or the output of hierarchical clustering from
the function |
sigmahat |
|
Author(s)
Peter Buehlmann, Ruben Dezeure, Lukas Meier
References
Bühlmann, P. (2013) Statistical significance in high-dimensional linear models. Bernoulli 19, 1212–1242.
Examples
x <- matrix(rnorm(100 * 100), nrow = 100, ncol = 100)
y <- x[,1] + x[,2] + rnorm(100)
fit.ridge <- ridge.proj(x, y)
which(fit.ridge$pval.corr < 0.05)
## Use the scaled lasso for the initial estimate
fit.ridge.scaled <- ridge.proj(x, y, betainit = "scaled lasso")
which(fit.ridge.scaled$pval.corr < 0.05)
## Group-wise testing of the first two coefficients
fit.ridge$groupTest(1:2)
## Hierarchical testing using distance matrix based on
## correlation matrix
out.clust <- fit.ridge$clusterGroupTest()
plot(out.clust)
## Fit the method without doing the preparations
## for group testing (saves time and memory)
fit.ridge.faster <- ridge.proj(x, y, suppress.grouptesting = TRUE)