Function rgsl::fit::mul
[−]
[src]
pub fn mul(x: &[f64], xstride: usize, y: &[f64], ystride: usize, n: usize, c1: &mut f64, cov11: &mut f64, sumsq: &mut f64) -> Value
This function computes the best-fit linear regression coefficient c1 of the model Y = c_1 X for the datasets (x, y), two vectors of length n with strides xstride and ystride. The errors on y are assumed unknown so the variance of the parameter c1 is estimated from the scatter of the points around the best-fit line and returned via the parameter cov11. The sum of squares of the residuals from the best-fit line is returned in sumsq.