dot-run_chisq: Chi-squared goodness-of-fit test (Pearson, equiprobable bins)

.run_chisqR Documentation

Chi-squared goodness-of-fit test (Pearson, equiprobable bins)

Description

Uses k equiprobable bins defined by the theoretical quantile function (where available) or equal-width bins as a fallback. Degrees of freedom are adjusted for the number of estimated parameters: df = k - 1 - n_params (minimum 1). Bins with expected count < 1 are merged with their neighbours before the test statistic is computed.

Usage

.run_chisq(x, pcdf, n_params = 0L, q_fun = NULL, params = NULL)

Arguments

x

Numeric vector of observed data.

pcdf

Single-argument CDF function: pcdf(q) -> P(X <= q).

n_params

Integer: number of estimated parameters (for df correction).


FitVerse documentation built on Dec. 1, 2026, 1:07 a.m.