randomizedLassoInf: Inference for the randomized lasso, with a fixed lambda

Description Usage Arguments Details Value Author(s) References Examples

View source: R/funs.randomized.R

Description

Compute p-values and confidence intervals based on selecting an active set with the randomized lasso, at a fixed value of the tuning parameter lambda and using Gaussian randomization.

Usage

1
2
3
4
5
6
7
randomizedLassoInf(rand_lasso_soln, 
		   targets=NULL,
                   level=0.9,
                   sampler=c("norejection", "adaptMCMC"),
                   nsample=10000,
                   burnin=2000,
                   opt_samples=NULL)

Arguments

rand_lasso_soln

A randomized lasso solution as returned by randomizedLasso.

targets

If not NULL, should be a list with entries observed_target, cov_target, crosscov_target_internal. The observed_target should be (pre-selection) asymptotically Gaussian around targeted parameters. The quantity cov_target should be an estimate of the (pre-selection) covariance of observed_target. Finally, crosscov_target_internal should be an estimate of the (pre-selection) covariance of observed_target and the internal representation of the data of the LASSO. For both "gaussian" and "binomial", this is the vector

\hat{β}_{E,MLE}, X_{-E}^T(y - μ(X_E\hat{β}_{E,MLE}))

For example, this cross-covariance could be estimated by jointly bootstrapping the target of interest and the above vector.

level

Level for confidence intervals.

sampler

Which sampler to use – default is a no-rejection sampler. Otherwise use MCMC from the adaptMCMC package.

nsample

Number of samples of optimization variables to sample.

burnin

How many samples of optimization variable to discard (should be less than nsample).

opt_samples

Optional sample of optimization variables. If not NULL then no MCMC will be run.

Details

This function computes selective p-values and confidence intervals for a randomized version of the lasso, given a fixed value of the tuning parameter lambda.

Value

targets

A list with entries observed_target, cov_target, crosscov_target_internal. See argument description above.

pvalues

P-values testing hypotheses that each specific target is 0.

ci

Confidence interval for parameters determined by targets.

Author(s)

Jelena Markovic, Jonathan Taylor

References

Jelena Markovic and Jonathan Taylor (2016). Bootstrap inference after using multiple queries for model selection. arxiv.org:1612.07811

Xiaoying Tian and Jonathan Taylor (2015). Selective inference with a randomized response. arxiv.org:1507.06739

Xiaoying Tian, Snigdha Panigrahi, Jelena Markovic, Nan Bi and Jonathan Taylor (2016). Selective inference after solving a convex problem. arxiv.org:1609.05609

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(43)
n = 50
p = 10
sigma = 0.2
lam = 0.5

X = matrix(rnorm(n*p), n, p)
X = scale(X, TRUE, TRUE) / sqrt(n-1)

beta = c(3,2,rep(0,p-2))
y = X%*%beta + sigma*rnorm(n)

result = randomizedLasso(X, y, lam)
inf_result = randomizedLassoInf(result)

selectiveInference documentation built on Sept. 7, 2019, 9:02 a.m.