pub struct SimpleRegressionResult {Show 16 fields
pub slope: f64,
pub intercept: f64,
pub r_squared: f64,
pub adjusted_r_squared: f64,
pub slope_se: f64,
pub intercept_se: f64,
pub slope_t: f64,
pub intercept_t: f64,
pub slope_p: f64,
pub intercept_p: f64,
pub residual_se: f64,
pub f_statistic: f64,
pub f_p_value: f64,
pub residuals: Vec<f64>,
pub fitted: Vec<f64>,
pub n: usize,
}Expand description
Result of a simple linear regression: y = intercept + slope · x.
Fields§
§slope: f64Slope coefficient (β₁).
intercept: f64Intercept (β₀).
r_squared: f64Coefficient of determination (R²).
adjusted_r_squared: f64Adjusted R² = 1 - (1-R²)(n-1)/(n-2).
slope_se: f64Standard error of the slope.
intercept_se: f64Standard error of the intercept.
slope_t: f64t-statistic for slope (H₀: β₁ = 0).
intercept_t: f64t-statistic for intercept (H₀: β₀ = 0).
slope_p: f64p-value for slope.
intercept_p: f64p-value for intercept.
residual_se: f64Residual standard error (√(SSE/(n-2))).
f_statistic: f64F-statistic (= t² for simple regression).
f_p_value: f64p-value for F-statistic.
residuals: Vec<f64>Residuals (yᵢ - ŷᵢ).
fitted: Vec<f64>Fitted values (ŷᵢ).
n: usizeSample size.
Trait Implementations§
Source§impl Clone for SimpleRegressionResult
impl Clone for SimpleRegressionResult
Source§fn clone(&self) -> SimpleRegressionResult
fn clone(&self) -> SimpleRegressionResult
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 moreAuto Trait Implementations§
impl Freeze for SimpleRegressionResult
impl RefUnwindSafe for SimpleRegressionResult
impl Send for SimpleRegressionResult
impl Sync for SimpleRegressionResult
impl Unpin for SimpleRegressionResult
impl UnsafeUnpin for SimpleRegressionResult
impl UnwindSafe for SimpleRegressionResult
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