Skip to content

Commit

Permalink
Add ci=0 or ci=FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Aug 30, 2023
1 parent 4b90b2e commit 020f96b
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions R/confint.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,19 @@ confint.rxSolve <- function(object, parm = NULL, level = 0.95, ...) {
by = .by
)
class(.lst) <- "rxHidden"
if (!any(names(.stk) == "sim.id")) {
.ntot <- object$env$.args$nSub
if (.ntot == 1L && object$env$.args$nStud > 1L) {
.ntot <- object$env$.args$nStud
if (.ci ==0 || !any(names(.stk) == "sim.id")) {
if (any(names(.stk) == "sim.id")) {
.stk$id <- factor(paste(.stk$sim.id, .stk$id))
.ntot <- length(levels(.stk$id))
.stk$id <- as.integer(.stk$id)
} else {
.ntot <- object$env$.args$nSub
if (.ntot == 1L && object$env$.args$nStud > 1L) {
.ntot <- object$env$.args$nStud
}
}
if (.ci == 0 || .ntot < 2500) {
if (.ci == 0.0) {
if (.ci != 0.0) {
.mwarn("in order to put confidence bands around the intervals, you need at least 2500 simulations")
message("summarizing data...", appendLF = FALSE)
}
Expand Down

0 comments on commit 020f96b

Please sign in to comment.