Statistical helpers#

Distribution functions used by the smooth-term tests, exposed for readers who want to reproduce a p-value by hand.

superglm.psum_chisq

P[sum(w_j * chi²(d_j)) + sigma * N(0,1) > q] via Imhof (1961).

superglm.satterthwaite

Satterthwaite approximation: match first 2 moments to c * chi²(d).

superglm.wood_test_smooth

Smooth-term significance test from Wood (2013).