Skip to content

Commit

Permalink
Merge branch 'develop-0.5.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
aphalo committed May 14, 2024
2 parents 8986966 + 5322a92 commit d9c83e2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions R/stat-poly-eq.R
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,18 @@ poly_eq_compute_group_fun <- function(data,
# error handler needs to be added as ci_rsquared() will call stop on non-convergence
# or alternatively implement a non-stop version of ci_rsquared()
rr.confint <-
confintr::ci_rsquared(x = f.value,
try(confintr::ci_rsquared(x = f.value,
df1 = f.df1,
df2 = f.df2,
probs = ((1 - rsquared.conf.level) / 2) * c(1, -1) + c(0, 1) )
rr.confint.low <- rr.confint[["interval"]][1]
rr.confint.high <- rr.confint[["interval"]][2]
probs = ((1 - rsquared.conf.level) / 2) * c(1, -1) + c(0, 1) ),
silent = TRUE)
if (inherits(rr.confint, what = "try-error")) {
warning("CI computation error: ", attr(rr.confint, "condition"))
rr.confint.low <- rr.confint.high <- NA_real_
} else {
rr.confint.low <- rr.confint[["interval"]][1]
rr.confint.high <- rr.confint[["interval"]][2]
}
}
} else {
rr <- rr.confint.low <- rr.confint.high <- NA_real_
Expand Down

0 comments on commit d9c83e2

Please sign in to comment.