pub fn regression_depth(
fit: &FregreLmResult,
data: &FdMatrix,
y: &[f64],
scalar_covariates: Option<&FdMatrix>,
n_boot: usize,
depth_type: DepthType,
seed: u64,
) -> Result<RegressionDepthResult, FdarError>Expand description
Regression depth diagnostics for a linear functional regression.
Computes depth of each observation’s FPC scores and depth of the regression coefficients in a bootstrap distribution.
§Arguments
fit— FittedFregreLmResultdata— Functional data (n × m)y— Response (length n)scalar_covariates— Optional scalar covariatesn_boot— Number of bootstrap iterationsdepth_type— Which depth measure to useseed— Random seed
§Errors
Returns FdarError::InvalidDimension if data has fewer than 4 rows,
zero columns, or y.len() does not match the row count.
Returns FdarError::InvalidParameter if n_boot is zero.
Returns FdarError::ComputationFailed if score depth computation returns
empty.