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 |
A |
an |
b |
a |
eta |
an |
Sigma |
an |
p |
a vector of probabilities for which we return
equivalent |
level |
if |
Sigma_eta |
an |
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)