ci_connorm {epsiwal}R Documentation

ci_connorm .

Description

Confidence intervals on normal mean, subject to linear constraints.

Usage

ci_connorm(y, A, b, eta, Sigma = NULL, p = c(level/2, 1 - (level/2)),
  level = 0.05, Sigma_eta = Sigma %*% eta)

Arguments

y

an n vector, assumed multivariate normal with mean \mu and covariance \Sigma.

A

an k \times n matrix of constraints.

b

a k vector of inequality limits.

eta

an n vector of the test contrast, \eta.

Sigma

an n \times n matrix of the population covariance, \Sigma. Not needed if Sigma_eta is given.

p

a vector of probabilities for which we return equivalent \eta^{\top}\mu.

level

if p is not given, we set it by default to c(level/2,1-level/2).

Sigma_eta

an n vector of \Sigma \eta.

Details

Inverts the constrained normal inference procedure described by Lee et al.

Let y be multivariate normal with unknown mean \mu and known covariance \Sigma. Conditional on Ay \le b for conformable matrix A and vector b, and given constrast vector eta and level p, we compute \eta^{\top}\mu such that the cumulative distribution of \eta^{\top}y equals p.

Value

The values of \eta^{\top}\mu which have the corresponding CDF.

Note

An error will be thrown if we do not observe A y \le b.

Author(s)

Steven E. Pav shabbychef@gmail.com

References

Lee, J. D., Sun, D. L., Sun, Y. and Taylor, J. E. "Exact post-selection inference, with application to the Lasso." Ann. Statist. 44, no. 3 (2016): 907-927. doi:10.1214/15-AOS1371. https://arxiv.org/abs/1311.6238

See Also

the CDF function, pconnorm.

Examples

set.seed(1234)
n <- 10
y <- rnorm(n)
A <- matrix(rnorm(n*(n-3)),ncol=n)
b <- A%*%y + runif(nrow(A))
Sigma <- diag(runif(n))
mu <- rnorm(n)
eta <- rnorm(n)

pval <- pconnorm(y=y,A=A,b=b,eta=eta,mu=mu,Sigma=Sigma)
cival <- ci_connorm(y=y,A=A,b=b,eta=eta,Sigma=Sigma,p=pval)
stopifnot(abs(cival - sum(eta*mu)) < 1e-4)


[Package epsiwal version 0.1.0 Index]