pub struct CumulantArrays {
pub q: usize,
pub info: Vec<f64>,
pub nu3: Vec<f64>,
pub nu4: Vec<f64>,
}Expand description
The exact cumulant arrays the Bartlett/Skovgaard expansions consume, over a
tested coefficient block Z (the n × q design columns of the term under
test). For a GLM-type log-likelihood ℓ = Σᵢ ℓᵢ(ηᵢ) with ηᵢ = xᵢᵀβ, the
derivatives w.r.t. the block coefficients factor through ηᵢ by the chain
rule, so every cumulant array is a row sum of the per-row η-derivative
times an outer product of Z-rows:
info_{ab} = −Σᵢ ℓ''ᵢ · Z_{ia} Z_{ib} (observed/expected Fisher info)
nu3_{abc} = Σᵢ ℓ'''ᵢ · Z_{ia} Z_{ib} Z_{ic}
nu4_{abcd} = Σᵢ ℓ''''ᵢ · Z_{ia} Z_{ib} Z_{ic} Z_{id}These are exact (the per-row ℓ⁽ᵏ⁾ come from the #932 tower) and fully
symmetric in their indices by construction. They are stored flattened in
row-major order (nu3 length q³, nu4 length q⁴) so the consuming
contraction can stride them without re-deriving the symmetry.
Fields§
§q: usizeBlock dimension q.
info: Vec<f64>Fisher information block info_{ab} (q × q, row-major).
nu3: Vec<f64>Third cumulant array nu3_{abc} (q³, row-major).
nu4: Vec<f64>Fourth cumulant array nu4_{abcd} (q⁴, row-major).
Implementations§
Trait Implementations§
Source§impl Clone for CumulantArrays
impl Clone for CumulantArrays
Source§fn clone(&self) -> CumulantArrays
fn clone(&self) -> CumulantArrays
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 CumulantArrays
impl RefUnwindSafe for CumulantArrays
impl Send for CumulantArrays
impl Sync for CumulantArrays
impl Unpin for CumulantArrays
impl UnsafeUnpin for CumulantArrays
impl UnwindSafe for CumulantArrays
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.