ci_connorm: ci_connorm .

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Confidence intervals on normal mean, subject to linear constraints.

Usage

1
2
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 μ and covariance Σ.

A

an k \times n matrix of constraints.

b

a k vector of inequality limits.

eta

an n vector of the test contrast, η.

Sigma

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

p

a vector of probabilities for which we return equivalent η^{\top}μ.

level

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

Sigma_eta

an n vector of Σ η.

Details

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

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

Value

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

Note

An error will be thrown if we do not observe A y <= 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

epsiwal documentation built on July 2, 2019, 5:07 p.m.