Skip to content

Commit

Permalink
messed up the shift argumen
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed May 14, 2024
1 parent b03e7d5 commit 9756aa1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions R/confint-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,15 @@
# class(out) <- class(out)[-(1:2)]

## using se and crit, compute the lower and upper intervals
out <- add_column(out,
.lower_ci = out$.estimate - (out$.crit * out$.se),
.upper_ci = out$.estimate + (out$.crit * out$.se)
# out <- add_column(out,
# .lower_ci = out$.estimate - (out$.crit * out$.se),
# .upper_ci = out$.estimate + (out$.crit * out$.se)
# )

out <- mutate(out,
.estimate = .data$.estimate + const,
.lower_ci = .data$.estimate - (.data$.crit * .data$.se),
.upper_ci = .data$.estimate + (.data$.crit * .data$.se)
)

## transform
Expand All @@ -428,8 +434,7 @@
# smooth_estimates has columns in different places, relocate them to match
# old output as much as possible
out <- relocate(out, all_of(c(
".estimate", ".se", ".crit", ".lower_ci",
".upper_ci"
".estimate", ".se", ".crit", ".lower_ci", ".upper_ci"
)), .after = last_col())

## prepare for return
Expand Down

0 comments on commit 9756aa1

Please sign in to comment.