View source: R/test_intersection_sw.R
| test_intersection_sw | R Documentation |
Calculating test statistics and p-values for the signed Wald intersection test given by
SW = \inf_{\theta \in \cap_{i=1}^n H_i}
\{(\widehat{\theta}-\theta)^\top W\widehat{\Sigma}W
(\widehat{\theta}-\theta)\}
with individual hypotheses for each
coordinate of \theta given by H_i: \theta_j < \delta_j for some
non-inferiority margin \delta_j, j=1,\ldots,n. #
test_intersection_sw(
par,
vcov,
noninf = 0,
weights = 1,
nsim.null = 10000,
index = NULL,
control = list(),
par.name = "theta"
)
par |
(numeric) parameter estimates or |
vcov |
(matrix) asymptotic variance estimate |
noninf |
(numeric) non-inferiority margins |
weights |
(numeric) optional weights |
nsim.null |
(integer) number of sample used in Monte-Carlo simulation |
index |
(integer) subset of parameters to test |
control |
(list) arguments to alternating projection algorithm. See details section. |
par.name |
(character) parameter names in output |
The constrained least squares problem is solved using Dykstra's
algorithm. The following parameters for the optimization can be controlled
via the control list argument: dykstra_niter sets the maximum number of
iterations (default 500), dykstra_tol convergence tolerance of the
alternating projection algorithm (default 1e-7), pinv_tol tolerance for
calculating the pseudo-inverse matrix (default
length(par).Machine$double.epsmax(eigenvalue)).
htest object
Klaus Kähler Holst, Christian Bressen Pipper
Christian Bressen Pipper, Andreas Nordland & Klaus Kähler Holst (2025) A general approach to construct powerful tests for intersections of one-sided null-hypotheses based on influence functions. arXiv: https://arxiv.org/abs/2511.07096.
test_zmax_onesided lava::test_wald lava::closed_testing
S <- matrix(c(1, 0.5, 0.5, 2), 2, 2)
thetahat <- c(0.5, -0.2)
test_intersection_sw(thetahat, S, nsim.null = 1e5)
test_intersection_sw(thetahat, S, weights = NULL)
## Not run:
# only on 'lava' >= 1.8.2
e <- estimate(coef = thetahat, vcov = S, labels = c("p1", "p2"))
lava::closed_testing(e, test_intersection_sw, noninf = c(-0.1, -0.1)) |>
summary()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.