pub struct SmoothTestInput<'a> {
pub beta: ArrayBase<ViewRepr<&'a f64>, Dim<[usize; 1]>>,
pub covariance: &'a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>,
pub influence_matrix: Option<&'a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>>,
pub whitening_gram: Option<&'a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>>,
pub coeff_range: Range<usize>,
pub edf: f64,
pub nullspace_dim: usize,
pub residual_df: f64,
pub scale: SmoothTestScale,
}Expand description
Inputs to wood_smooth_test. beta is the full coefficient vector;
the term block being tested is beta[coeff_range]. covariance is the
matching posterior covariance Σ̂ (full p×p; the diagonal block is sliced
out). covariance must be the scale-included posterior covariance
(mgcv Vb/Vp, i.e. H⁻¹ already multiplied by the dispersion φ̂),
so the Wald statistic T = β̂'·Σ̂⁻·β̂ is dimensionless — the residual
dispersion has already been divided out and the F-statistic is T/ref_df
with no further φ̂ factor. influence_matrix is the optional
coefficient-space influence F = H⁻¹ X'WX; when present
tr(F_jj)² / tr(F_jj²) is used as the Wood-corrected reference d.f.
whitening_gram is the optional term-block-aligned weighted design Gram
G = X'WX (H − S(λ), full p×p, same coefficient layout as
covariance); when present the covariance is mapped into the Wood (2013)
fitted-value space R·V·Rᵀ (RᵀR = G) before the rank-r truncation, so
the pseudo-inverse keeps the directions that carry the estimated function
rather than the raw largest-variance (heavily-penalized) coefficient
directions. When absent the raw coefficient covariance is truncated directly
— a graceful fallback for persisted models whose Gram was not serialized.
edf is the smooth’s effective d.f. (rank of the truncated pseudo-inverse);
nullspace_dim is the fixed-effect (unpenalized) leading dimension within
the block, used as a floor on the truncation rank (those directions are
never shrunk and must always be tested). residual_df is the denominator
d.f. for the Estimated-scale F branch.
Fields§
§beta: ArrayBase<ViewRepr<&'a f64>, Dim<[usize; 1]>>§covariance: &'a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>§influence_matrix: Option<&'a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>>§whitening_gram: Option<&'a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>>§coeff_range: Range<usize>§edf: f64§nullspace_dim: usize§residual_df: f64§scale: SmoothTestScaleTrait Implementations§
Source§impl<'a> Clone for SmoothTestInput<'a>
impl<'a> Clone for SmoothTestInput<'a>
Source§fn clone(&self) -> SmoothTestInput<'a>
fn clone(&self) -> SmoothTestInput<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for SmoothTestInput<'a>
impl<'a> RefUnwindSafe for SmoothTestInput<'a>
impl<'a> Send for SmoothTestInput<'a>
impl<'a> Sync for SmoothTestInput<'a>
impl<'a> Unpin for SmoothTestInput<'a>
impl<'a> UnsafeUnpin for SmoothTestInput<'a>
impl<'a> UnwindSafe for SmoothTestInput<'a>
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.