pub struct DffitsResult {
pub test_name: String,
pub dffits: Vec<f64>,
pub n: usize,
pub p: usize,
pub threshold: f64,
pub influential_observations: Vec<usize>,
pub interpretation: String,
pub guidance: String,
}Expand description
Result of DFFITS analysis.
DFFITS measures the influence of each observation on its own fitted value. It is the number of standard errors that the fitted value changes when observation i is omitted.
§Fields
test_name- Name of the diagnosticdffits- Vector of DFFITS values (one per observation)n- Number of observationsp- Number of parameters (including intercept)threshold- Common threshold (2*√(p/n)) for identifying influential observationsinfluential_observations- Indices of observations exceeding the threshold (1-based)interpretation- Human-readable explanation of resultsguidance- Recommendations based on results
§Example
use linreg_core::diagnostics::DffitsResult;
let result = DffitsResult {
test_name: "DFFITS".to_string(),
dffits: vec![0.1, 0.3, 1.2, 0.05, 0.2],
n: 5,
p: 2,
threshold: 1.26,
influential_observations: vec![],
interpretation: "No highly influential observations.".to_string(),
guidance: "Model appears stable.".to_string(),
};Fields§
§test_name: StringName of the test
dffits: Vec<f64>DFFITS value for each observation
n: usizeNumber of observations
p: usizeNumber of parameters (including intercept)
threshold: f64Common threshold: 2*√(p/n)
influential_observations: Vec<usize>Indices of observations exceeding |DFFITS| > threshold (1-based indexing)
interpretation: StringInterpretation of results
guidance: StringGuidance for handling influential observations
Trait Implementations§
Source§impl Clone for DffitsResult
impl Clone for DffitsResult
Source§fn clone(&self) -> DffitsResult
fn clone(&self) -> DffitsResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DffitsResult
impl Debug for DffitsResult
Auto Trait Implementations§
impl Freeze for DffitsResult
impl RefUnwindSafe for DffitsResult
impl Send for DffitsResult
impl Sync for DffitsResult
impl Unpin for DffitsResult
impl UnwindSafe for DffitsResult
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
Mutably borrows from an owned value. Read more