R/print.R

Defines functions print.di_set print.di_band print.di_estimate

Documented in print.di_band print.di_estimate print.di_set

#' @export
print.di_estimate <- function(x, ...) {
  cat("<debiasedInference estimate>\n")
  cat(" method:   ", x$method, "\n", sep = "")
  cat(" bandwidth:", format(x$bandwidth), "\n")
  cat(" tau:       ", format(x$tau), "\n", sep = "")
  cat(" grid size: ", length(x$estimate), "\n", sep = "")
  invisible(x)
}

#' @export
print.di_band <- function(x, ...) {
  cat("<debiasedInference simultaneous confidence band>\n")
  cat(" method:    ", x$method, "\n", sep = "")
  cat(" confidence:", format(x$confidence), "\n")
  cat(" bootstrap: ", x$n_boot, " replicates\n", sep = "")
  cat(" bandwidth: ", format(x$bandwidth), "\n", sep = "")
  invisible(x)
}

#' @export
print.di_set <- function(x, ...) {
  cat("<debiasedInference level set>\n")
  cat(" method: ", x$method, "\n", sep = "")
  cat(" level:  ", format(x$level), "\n", sep = "")
  root_count <- if (is.null(dim(x$roots))) length(x$roots) else nrow(x$roots)
  cat(" roots:  ", root_count, "\n", sep = "")
  invisible(x)
}

Try the debiasedInference package in your browser

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

debiasedInference documentation built on Sept. 29, 2026, 5:09 p.m.