Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Feb 28, 2022
1 parent 8af310f commit f841500
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/binned_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ binned_residuals <- function(model, term = NULL, n_bins = NULL, ...) {
d <- do.call(rbind, d)
d <- d[stats::complete.cases(d), ]

# CIs
d$CI_low <- d$ybar - stats::qnorm(.975) * d$se
d$CI_high <- d$ybar + stats::qnorm(.975) * d$se

gr <- abs(d$ybar) > abs(d$se)
d$group <- "yes"
d$group[gr] <- "no"
Expand Down

0 comments on commit f841500

Please sign in to comment.