pub struct SmoothTermLrInference {
pub name: String,
pub term_idx: usize,
pub statistic_lr: f64,
pub ref_df: f64,
pub bartlett_factor: f64,
pub bartlett_factor_conditional: Option<f64>,
pub rho_variation_shift: Option<f64>,
pub statistic_corrected: f64,
pub p_value_uncorrected: f64,
pub p_value_corrected: f64,
pub material: bool,
pub correction: SmoothLrCorrection,
}Expand description
The Bartlett-corrected per-term significance report for one penalized smooth term (#1063). Unlike the summary table’s Wood rank-truncated Wald statistic, this is a genuine likelihood-ratio statistic from a constrained refit (the smooth dropped), so the exact Lawley LR Bartlett factor corrects the right quantity.
Fields§
§name: StringSmooth-term name (matches the summary row).
term_idx: usizeSmooth-term index within resolvedspec.smooth_terms.
statistic_lr: f64The uncorrected likelihood-ratio statistic W = 2(ℓ_full − ℓ_null),
floored at zero (a non-negative LR by construction).
ref_df: f64Reference degrees of freedom d (the Wood truncation tr(F)²/tr(F²) on
the term’s influence block, falling back to the term EDF).
bartlett_factor: f64Lawley LR Bartlett factor c = E[W]/d = 1 + Δε/d when computable, else
1.0 (no correction).
bartlett_factor_conditional: Option<f64>Fixed-λ conditional factor c_cond = 1 + Δε(ρ̂)/d when the estimated-λ
correction was applied. None means the applied factor was either the
fixed-λ factor itself or no Lawley correction was available.
rho_variation_shift: Option<f64>Increment in Lawley’s LR mean shift due solely to ρ̂ sampling variation,
0.5 * tr(H_Δε Cov(ρ̂)), when estimated-λ correction was applied.
statistic_corrected: f64Bartlett-corrected statistic W* = W / c.
p_value_uncorrected: f64Uncorrected p-value P(χ²_d > W).
p_value_corrected: f64Corrected p-value P(χ²_d > W*); equals the uncorrected value when no
correction was applied.
material: boolWhether the second-order correction is material (#939 deliverable 4):
the per-test diagnostic “is n too small for first-order inference
here?”. true when a correction was applied and it moves the result by
more than SMOOTH_LR_MATERIAL_THRESHOLD — measured as the larger of the
relative Bartlett-factor distance from one |c − 1| and the relative
p-value change |p* − p| / max(p, p*, ε). false when correction is
SmoothLrCorrection::None (no correction was applied).
correction: SmoothLrCorrectionWhich statistic the corrected p-value is built from.
Trait Implementations§
Source§impl Clone for SmoothTermLrInference
impl Clone for SmoothTermLrInference
Source§fn clone(&self) -> SmoothTermLrInference
fn clone(&self) -> SmoothTermLrInference
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 Freeze for SmoothTermLrInference
impl RefUnwindSafe for SmoothTermLrInference
impl Send for SmoothTermLrInference
impl Sync for SmoothTermLrInference
impl Unpin for SmoothTermLrInference
impl UnsafeUnpin for SmoothTermLrInference
impl UnwindSafe for SmoothTermLrInference
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.