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 nn vector, assumed multivariate normal with mean μ\mu and covariance Σ\Sigma.

A

an k×nk \times n matrix of constraints.

b

a kk vector of inequality limits.

eta

an nn vector of the test contrast, η\eta.

Sigma

an n×nn \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 nn vector of Ση\Sigma \eta.

Details

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

Let yy be multivariate normal with unknown mean μ\mu and known covariance Σ\Sigma. Conditional on AybAy \le b for conformable matrix AA and vector bb, and given constrast vector etaeta and level pp, we compute ημ\eta^{\top}\mu such that the cumulative distribution of ηy\eta^{\top}y equals pp.

Value

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

Note

An error will be thrown if we do not observe AybA 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]