Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 2.18 KB

File metadata and controls

31 lines (22 loc) · 2.18 KB

Canonical Statistical Specification

All implementations expose the same model names and parameterization.

Model Parameters Support
normal mu, sigma real
lognormal mu_log, sigma_log positive
exponential rate nonnegative
gamma shape, scale positive
weibull shape, scale nonnegative
beta alpha, beta, known lower, upper open bounded interval
gumbel loc, scale real; maxima convention
gev loc, scale, xi 1 + xi*(x-loc)/scale > 0
poisson lambda nonnegative integers

The GEV CDF is exp(-(1 + xi*z)^(-1/xi)), with z=(x-loc)/scale; xi=0 is Gumbel. Beta likelihoods include the Jacobian for transformation from (lower, upper) to (0,1).

For maximized log likelihood ell, sample size n, and free parameter count k:

  • AIC = 2*k - 2*ell
  • AICc = AIC + 2*k*(k+1)/(n-k-1) when n > k+1, otherwise missing
  • BIC = log(n)*k - 2*ell

For continuous models, the K-S statistic is the maximum of i/n-F(x_i) and F(x_i)-(i-1)/n. For discrete models, it is evaluated on both sides of every distinct probability-mass jump, which correctly handles ties. Its fitted-model p-value uses parametric Bootstrap with refitting: (1 + number(D_boot >= D_obs))/(B+1). Each model receives a deterministic model-specific random stream, so results do not depend on candidate order. Candidates with p >= ks_alpha pass; the passing model with minimum BIC is selected. If none pass, minimum BIC is diagnostic only.

Normal, lognormal, exponential, and Poisson MLEs use their closed-form solutions. Other models use unconstrained numerical optimization with logarithmic transforms for positive parameters.

Profile-likelihood intervals hold one canonical parameter fixed, re-optimize all nuisance parameters, and solve 2*(ell_max-ell_profile)=chi2(level,1). Wald intervals use the inverse observed Hessian on unconstrained coordinates and are back-transformed, preserving positivity. Default levels are 0.90, 0.95, and 0.99.

auto data typing classifies a sample as discrete only when every value is a nonnegative integer. Continuous and discrete likelihoods are never ranked together.