File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,8 +142,11 @@ repeated_p <- function(p,
142142
143143 # If boundary at analysis K is crossed even at alpha ~ 0,
144144 # the p-value is extremely small. Return the lower bound.
145+ # Use >= 0 to also handle the edge case where the exceedance is exactly 0
146+ # (boundary exactly crossed), which would cause uniroot to fail because
147+ # f(lower) and f(upper) would have the same sign.
145148 exc_lower <- exceedance_K(lower )
146- if (exc_lower > 0 ) {
149+ if (exc_lower > = 0 ) {
147150 message(
148151 " Boundary crossed at alpha = " , lower ,
149152 " ; returning " , lower , " as a lower bound."
Original file line number Diff line number Diff line change @@ -166,8 +166,11 @@ sequential_p <- function(p,
166166
167167 # If a boundary is already crossed at the most stringent alpha (~0),
168168 # the observed p-values are extremely small. Return the lower bound.
169+ # Use >= 0 to also handle the edge case where the exceedance is exactly 0
170+ # (boundary exactly crossed), which would cause uniroot to fail because
171+ # f(lower) and f(upper) would have the same sign.
169172 exc_lower <- max_exceedance(lower )
170- if (exc_lower > 0 ) {
173+ if (exc_lower > = 0 ) {
171174 message(
172175 " Boundary crossed at alpha = " , lower ,
173176 " ; returning " , lower , " as a lower bound."
You can’t perform that action at this time.
0 commit comments