Hi,
I?m using the function gsl_multifit_linear and I?m having the
following problem.
I?m using the function in a loop to approximate a function for
different periods. The problem is that for different periods, I use
different variables in the approximation. So what I do is: I define a
matrix X with all the possible variables I?m going to use. The ones
that I don?t need for a certain period, I define them as zero. Thus,
when I run the OLS regression, the matrix X is not invertible.
However, I thought this wasn?t a problem for gsl_multifit_linear. I
though this function just simply eliminated the variables that create
the problem of singularity (all the ones that are zero, given the
regression includes a constant term). However, when I see the
coefficients estimated by the function, some of those aren?t exactly
zero. I checked the X matrix and it contains 0 where I intended to
have 0, so I do not understand why for some coefficients I get a 0
value (as I expected), but for some others I get something close to
zero, but not exactly 0 (for example, I get values like -2.19492e-08).
Thanks a lot,
Alvaro.
_______________________________________________
Bug-gsl mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gsl