R/dst_chisq.R

Defines functions dst_chisq

Documented in dst_chisq

#' Chi-squared Distribution
#'
#' Makes a distribution belonging to the family of
#' Chi-squared distributions.
#'
#' @param df degrees of freedom
#'
#' @examples
#' dst_chisq(3)
#'
#' @export
dst_chisq <- function(df) {
  if (df < 0) {
    stop('df must be non-negative')
  }
  dst_parametric(
    "chisq", df = df, .variable = "continuous", .env = "package:stats"
  )
}
vincenzocoia/distionary documentation built on March 5, 2024, 3:13 a.m.