R/one_thresholdsci.R

Defines functions one_thresholdsci

Documented in one_thresholdsci

#' Calculates the confidence intervals for the threshold of one condition
#' \code{one_thresholdsci} calculates the confidence intervals for the threshold
#' of one condition
#' @keywords internal
#' @export
one_thresholdsci <- function(d, ci, method) {
  if (method == 'percent') {
    threinf <- quantile(d$thre, .5*(1 - ci))[[1]]
    thresup <- quantile(d$thre, 1 - .5*(1 - ci))[[1]]
  }
  data.frame(threinf, thresup)
}

Try the quickpsy package in your browser

Any scripts or data that you put into this service are public.

quickpsy documentation built on March 11, 2026, 5:06 p.m.