hdi (version 0.1-7)

ridge.proj: 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 p.adjust.methods.

N

number of empirical samples (only used if multiplecorr.method = "WY").

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 \({1,\ldots,p}\) or a list thereof.

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 hclust as for clusterGroupBound. P-values are adjusted for multiple testing.

%\item{betahat}{initial estimate by the scaled lasso of \eqn{\beta^0}} %\item{bhat}{de-sparsified \eqn{\beta^0} estimate used for p-value calculation}
sigmahat

\(\widehat{\sigma}\) coming from the scaled lasso.

References

B<U+00FC>hlmann, P. (2013) Statistical significance in high-dimensional linear models. Bernoulli 19, 1212--1242.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataCamp Workspace