pub struct Influence {
pub hat_diag: Array1<f64>,
pub resid_studentized_internal: Array1<f64>,
pub resid_studentized_external: Array1<f64>,
pub cooks_distance: Array1<f64>,
pub dffits: Array1<f64>,
}Expand description
Per-observation OLS influence diagnostics.
Every field is an n-vector aligned with the rows of the design matrix.
Fields§
§hat_diag: Array1<f64>Hat-matrix diagonal (leverage), h_i = x_i' (X'X)^{-1} x_i.
resid_studentized_internal: Array1<f64>Internally studentized residuals.
resid_studentized_external: Array1<f64>Externally (leave-one-out) studentized residuals.
cooks_distance: Array1<f64>Cook’s distance.
dffits: Array1<f64>DFFITS.
Implementations§
Source§impl Influence
impl Influence
Sourcepub fn new(res: &LinearResults, exog: &Array2<f64>) -> Influence
pub fn new(res: &LinearResults, exog: &Array2<f64>) -> Influence
Compute the influence diagnostics from a fitted LinearResults and the
design matrix exog that produced it.
exog must be the same n × k design used in the fit (including any
constant column). The hat diagonal is formed from the model’s
normalized_cov_params, which for OLS equals (X'X)^{-1}.
§Panics
Panics if exog’s row count does not match the number of residuals.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Influence
impl RefUnwindSafe for Influence
impl Send for Influence
impl Sync for Influence
impl Unpin for Influence
impl UnsafeUnpin for Influence
impl UnwindSafe for Influence
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