#[non_exhaustive]pub struct FofReResult {Show 15 fields
pub intercept: Vec<f64>,
pub beta_surface: FdMatrix,
pub fitted: FdMatrix,
pub residuals: FdMatrix,
pub r_squared_t: Vec<f64>,
pub r_squared: f64,
pub ncomp_x: usize,
pub ncomp_y: usize,
pub fpca_x: FpcaResult,
pub fpca_y: FpcaResult,
pub coef_matrix: FdMatrix,
pub random_effects: FdMatrix,
pub sigma2_u: Vec<f64>,
pub sigma2_eps: f64,
pub n_subjects: usize,
}Expand description
Result of a random-effects function-on-function regression.
Extends FofResult with subject-level random intercepts on Y-score
components, enabling prediction for grouped/longitudinal functional data.
§Divergence from refund::pffr
R’s pffr(y ~ pcre(x)) uses a penalized-spline GAMM (mgcv) backend with
functional random effects represented in a spline basis. fof_re_regression
instead uses the FPC-score parametrization: both X and Y are decomposed into
FPC scores (fdata_to_pc_1d), and for each Y-score component a scalar linear
mixed model (REML EM, reusing famm::fit_scalar_mixed_model) is fitted with
the X-scores as fixed-effect covariates and subject IDs as the grouping factor.
No basis penalties are applied — this matches the locked design decision for
Phase 32.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.intercept: Vec<f64>Intercept function α(s) = mean_y(s) (length m_y)
beta_surface: FdMatrixCoefficient surface β(s,t) stored as (m_y × m_x) matrix
fitted: FdMatrixFitted response curves (n × m_y), including fixed + random effects
residuals: FdMatrixResidual curves (n × m_y)
r_squared_t: Vec<f64>R-squared per response grid point (length m_y)
r_squared: f64Overall R-squared (mean of pointwise R-squared)
ncomp_x: usizeNumber of predictor FPC components used
ncomp_y: usizeNumber of response FPC components used
fpca_x: FpcaResultFPCA of predictor (carried for prediction)
fpca_y: FpcaResultFPCA of response (carried for reconstruction)
coef_matrix: FdMatrixFixed-effect coefficient matrix B (ncomp_x × ncomp_y): Y-scores ≈ X-scores * B
random_effects: FdMatrixSubject-level random intercept functions (n_subjects × m_y)
sigma2_u: Vec<f64>Per-Y-component random-intercept variance (length ncomp_y)
sigma2_eps: f64Mean residual variance across Y-score components
n_subjects: usizeNumber of unique subjects
Trait Implementations§
Source§impl Clone for FofReResult
impl Clone for FofReResult
Source§fn clone(&self) -> FofReResult
fn clone(&self) -> FofReResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FofReResult
impl Debug for FofReResult
Source§impl PartialEq for FofReResult
impl PartialEq for FofReResult
impl StructuralPartialEq for FofReResult
Auto Trait Implementations§
impl Freeze for FofReResult
impl RefUnwindSafe for FofReResult
impl Send for FofReResult
impl Sync for FofReResult
impl Unpin for FofReResult
impl UnsafeUnpin for FofReResult
impl UnwindSafe for FofReResult
Blanket Implementations§
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> 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,
impl<T> Scalar for T
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.