TG.pvalue: Truncated Gaussian p-value.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/funs.inf.R

Description

Compute truncated Gaussian p-value of Lee et al. (2016) with arbitrary affine selection and covariance. Z should satisfy A

Usage

1
TG.pvalue(Z, A, b, eta, Sigma, null_value=0, bits=NULL)  

Arguments

Z

Observed data (assumed to follow N(mu, Sigma) with sum(eta*mu)=null_value)

A

Matrix specifiying affine inequalities AZ <= b

b

Offsets in the affine inequalities AZ <= b.

eta

Determines the target sum(eta*mu) and estimate sum(eta*Z).

Sigma

Covariance matrix of Z. Defaults to identity.

null_value

Hypothesized value of sum(eta*mu) under the null.

bits

Number of bits to be used for p-value and confidence interval calculations. Default is NULL, in which case standard floating point calculations are performed. When not NULL, multiple precision floating point calculations are performed with the specified number of bits, using the R package Rmpfr (if this package is not installed, then a warning is thrown, and standard floating point calculations are pursued). Note: standard double precision uses 53 bits so, e.g., a choice of 200 bits uses about 4 times double precision. The confidence interval computation is sometimes numerically challenging, and the extra precision can be helpful (though computationally more costly). In particular, extra precision might be tried if the values in the output columns of tailarea differ noticeably from alpha/2.

Details

This function computes selective p-values based on the polyhedral lemma of Lee et al. (2016).

Value

pv

One-sided P-values for active variables, uses the fact we have conditioned on the sign.

vlo

Lower truncation limits for statistic

vup

Upper truncation limits for statistic

sd

Standard error of sum(eta*Z)

Author(s)

Ryan Tibshirani, Rob Tibshirani, Jonathan Taylor, Joshua Loftus, Stephen Reid

References

Jason Lee, Dennis Sun, Yuekai Sun, and Jonathan Taylor (2016). Exact post-selection inference, with application to the lasso. Annals of Statistics, 44(3), 907-927.

Jonathan Taylor and Robert Tibshirani (2017) Post-selection inference for math L1-penalized likelihood models. Canadian Journal of Statistics, xx, 1-21. (Volume still not posted)

Examples

1
2
3
4
5
6
7
A = diag(5)
b = rep(1, 5)
Z = rep(0, 5)
Sigma = diag(5)
eta = as.numeric(c(1, 1, 0, 0, 0))
TG.pvalue(Z, A, b, eta, Sigma)
TG.pvalue(Z, A, b, eta, Sigma, null_value=1)

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