Skip to content

fit #

fn linear #

fn linear(x []f64, y []f64) (f64, f64)

linear computes linear fitting parameters. Errors on y-direction only

y(x) = a + b⋅x

See page 780 of [1] Reference: [1] Press WH, Teukolsky SA, Vetterling WT, Fnannery BP (2007) Numerical Recipes: The Art of Scientific Computing. Third Edition. Cambridge University Press. 1235p.

fn linear_sigma #

fn linear_sigma(x []f64, y []f64) (f64, f64, f64, f64, f64)

linear_sigma computes linear fitting parameters and variances (sigma_a, sigma_b) in the estimates of a and b Errors on y-direction only

y(x) = a + b⋅x

See page 780 of [1] Reference: [1] Press WH, Teukolsky SA, Vetterling WT, Fnannery BP (2007) Numerical Recipes: The Art of Scientific Computing. Third Edition. Cambridge University Press. 1235p.