Skip to content

Commit c8861e0

Browse files
added constraint description in docs, warning about constraint not being satisfied
1 parent 5d5d794 commit c8861e0

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

selectiveInference/R/funs.inf.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ TG.limits = function(Z, A, b, eta, Sigma=NULL) {
208208

209209
target_estimate = sum(as.numeric(eta) * as.numeric(Z))
210210

211+
if (max(A %*% as.numeric(Z) - b) > 0) {
212+
warning('Contsraint not satisfied. A %*% Z should be elementwise less than or equal to b')
213+
}
214+
211215
if (is.null(Sigma)) {
212216
Sigma = diag(rep(1, n))
213217
}

selectiveInference/man/TG.interval.Rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Truncated Gaussian confidence interval.
77
\description{
88
Compute truncated Gaussian interval of Lee et al. (2016) with
99
arbitrary affine selection and covariance.
10+
Z should satisfy A %*% Z elementise less then or equal b.
1011
}
1112
\usage{
1213
TG.interval(Z, A, b, eta, Sigma=NULL, alpha=0.1,

selectiveInference/man/TG.limits.Rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Truncation limits and standard deviation.
77
\description{
88
Compute truncated limits and SD for use in computing
99
p-values or confidence intervals of Lee et al. (2016).
10+
Z should satisfy A %*% Z elementise less then or equal b.
1011
}
1112
\usage{
1213
TG.limits(Z, A, b, eta, Sigma)

selectiveInference/man/TG.pvalue.Rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Truncated Gaussian p-value.
77
\description{
88
Compute truncated Gaussian p-value of Lee et al. (2016) with
99
arbitrary affine selection and covariance.
10+
Z should satisfy A %*% Z elementise less then or equal b.
1011
}
1112
\usage{
1213
TG.pvalue(Z, A, b, eta, Sigma, null_value=0, bits=NULL)

0 commit comments

Comments
 (0)