@@ -45,7 +45,7 @@ suppressWarnings(
4545)
4646foreach :: registerDoSEQ()
4747
48- x <- bsubmargin(object = m , base = psub , delta = 1 : 2 )
48+ x <- bsubmargin(object = m , base = psub , delta = c( 1 , 5 ) )
4949
5050stress_result <- function (x , part ) {
5151 x [[part ]][[" Stress" ]]
@@ -80,7 +80,7 @@ expect_pairwise_direction_and_ci <- function(pair) {
8080 pair_result <- bsubmargin(
8181 object = fit_pair ,
8282 base = build.base(pair ),
83- delta = 1 : 2
83+ delta = c( 1 , 5 )
8484 )
8585
8686 to_first <- pair_result [[pair [1 ]]][[" Stress" ]]
@@ -105,8 +105,8 @@ expect_pairwise_direction_and_ci <- function(pair) {
105105}
106106
107107test_that(" bsubmargin errors for missing required arguments" , {
108- expect_error(bsubmargin(base = psub , delta = 2 ))
109- expect_error(bsubmargin(object = m , delta = 2 ))
108+ expect_error(bsubmargin(base = psub , delta = 5 ))
109+ expect_error(bsubmargin(object = m , delta = 5 ))
110110 expect_error(bsubmargin(object = m , base = psub ))
111111})
112112
@@ -130,7 +130,7 @@ test_that("bsubmargin returns the expected nested result structure", {
130130 expect_true(all(tmp $ Level == " between" ))
131131 expect_true(all(tmp $ Reference == " clustermean" ))
132132 expect_setequal(unique(tmp $ From ), setdiff(parts , part ))
133- expect_setequal(unique(tmp $ Delta ), c(- 2 , - 1 , 1 , 2 ))
133+ expect_setequal(unique(tmp $ Delta ), c(- 5 , - 1 , 1 , 5 ))
134134 expect_type(tmp $ Estimate , " double" )
135135 expect_type(tmp $ Est.Error , " double" )
136136 expect_type(tmp $ CI_low , " double" )
@@ -145,9 +145,9 @@ test_that("bsubmargin returns estimates in a sensible range", {
145145 for (part in parts ) {
146146 tmp <- stress_result(x , part )
147147
148- expect_true(all(abs(tmp $ Estimate ) < = 0.5 ))
149- expect_true(all(abs(tmp $ CI_low ) < = 1 ))
150- expect_true(all(abs(tmp $ CI_high ) < = 1 ))
148+ expect_true(all(abs(tmp $ Estimate ) < = 1 ))
149+ expect_true(all(abs(tmp $ CI_low ) < = 5 ))
150+ expect_true(all(abs(tmp $ CI_high ) < = 5 ))
151151 }
152152})
153153
@@ -156,7 +156,7 @@ test_that("bsubmargin estimates grow in magnitude from 1 to 2 minutes", {
156156 tmp <- stress_result(x , part )
157157 magnitude_check <- tmp [
158158 ,
159- .(smaller = abs(Estimate [abs(Delta ) == 1 ]) < abs(Estimate [abs(Delta ) == 2 ])),
159+ .(smaller = abs(Estimate [abs(Delta ) == 1 ]) < abs(Estimate [abs(Delta ) == 5 ])),
160160 by = From
161161 ]
162162
0 commit comments