Expand description
Wood-style smooth-component Wald tests.
The test follows the rank-truncated covariance inverse used by Wood (2013):
the penalized part of the coefficient block is tested with a pseudo-inverse
of rank approximately equal to the term EDF, while unpenalized null-space
coefficients are kept full-rank. The reference degrees of freedom use the
coefficient-space influence block F_jj = (H⁻¹ X'WX)_jj.
Bartlett and Lawley mean corrections are likelihood-ratio corrections, so
they are not applied here. In the ordinary unpenalized Gaussian model the
Wald statistic satisfies T / q ~ F(q, ν) exactly, while under a ridge
penalty even the one-parameter statistic becomes (n / (n + λ))χ²₁ rather
than a central χ²/F reference target.
Structs§
- Smooth
Test Input - Inputs to
wood_smooth_test.betais the full coefficient vector; the term block being tested isbeta[coeff_range].covarianceis the matching posterior covariance Σ̂ (full p×p; the diagonal block is sliced out).covariancemust be the scale-included posterior covariance (mgcvVb/Vp, i.e.H⁻¹already multiplied by the dispersionφ̂), so the Wald statisticT = β̂'·Σ̂⁻·β̂is dimensionless — the residual dispersion has already been divided out and the F-statistic isT/ref_dfwith no furtherφ̂factor.influence_matrixis the optional coefficient-space influenceF = H⁻¹ X'WX; when presenttr(F_jj)² / tr(F_jj²)is used as the Wood-corrected reference d.f.edfis the smooth’s effective d.f. (rank truncation for the penalized subblock);nullspace_dimis the fixed-effect (unpenalized) leading dimension within the block.residual_dfis the denominator d.f. for theEstimated-scale F branch. - Smooth
Test Result - Output of
wood_smooth_test: the Wald statisticT = β̂'·Σ̂⁻ᵣ·β̂(rank-rpseudo-inverse on the penalized subblock, full-rank on the nullspace subblock), the reference d.f. used to compute the tail probability, and the resultingp_value(clamped to[0,1]).
Enums§
- Smooth
Test Scale - Whether the residual dispersion
φis known or estimated from the fit. Selects the reference distribution for the Wald p-value:Known→χ²_{ref_df}(e.g. binomial/Poisson),Estimated→F_{ref_df, residual_df}(e.g. Gaussian whereφ̂carries its own sampling variability).
Functions§
- wood_
smooth_ test - Wood (2013) rank-truncated Wald smooth-component test.