[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about use of gsl_multifit_linear_est

From: mhkelley2017
Subject: Question about use of gsl_multifit_linear_est
Date: Wed, 15 Jul 2020 17:38:51 -0600

I am confused about the use of gsl_multifit_linear capabilities.  I already
successfully use gsl_fit_linear.  I can successfully used
gsl_multifit_linear to actually extract the parameters to fit a polynomial
model to a dataset.  My confusion is how to extract the error estimates of
the overall fit.  I know (in principle) how to use the covariance matrix to
calculate the error estimate myself, but wanted to just use
gsl_multifit_linear_est, Which is provided for that purpose.


Unfortunately, I can't make sense of the manual page.


int gsl_multifit_linear_est(const
gsl_vector * x, const
gsl_vector * c, const
gsl_matrix * cov, double * y, double * y_err)

This function uses the best-fit multilinear regression coefficients c and
their covariance matrix cov to compute the fitted function value y and its
standard deviation y_err for the model  at the point x.


This implies that I should provide some value for "x" (along with the fit
coefficients and covariance matrix) to generate the corresponding values for
"y" and "y_err".  But the function wants me to provide a gsl_vector of x
values.  Why shouldn't that return a gsl_vector of y and y_err values?


I'm confused - anyone able to clarify?


Thanks in advance.


PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]