pub struct SimpleRegressionResult {Show 17 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 intercept_slope_covariance: 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 (ŷᵢ).
intercept_slope_covariance: f64Covariance of the intercept and slope estimates, −x̄ · MSE / Sxx.
With intercept_se and slope_se it gives the variance of the fitted
mean at any x (see predict_simple_intervals).
n: usizeSample size.
Trait Implementations§
Source§impl Clone for SimpleRegressionResult
impl Clone for SimpleRegressionResult
Auto 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