help-octave
[Top][All Lists]
Advanced

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

Re: Linear regression with uncertainties of the independent variable


From: przemek klosowski
Subject: Re: Linear regression with uncertainties of the independent variable
Date: Fri, 4 Mar 2022 17:49:52 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0


On 3/4/22 15:53, Jose Ramom Flores das Seixas wrote:

Hi:

I need to fit some data to a line, (xi,yi), using least squares, taking into account that both the dependent variable (yi) and the independent variable (xi) have uncertainties. The uncertainty is the same for all xi, but varies for different yi. Is there a function in octave that allows this adjustment to be made?

The "LinearRegression" function in the "optim" package allows to fit the data taking into account the uncertainties of the dependent variable, yi, but ,if I understand correctly, it does not consider the uncertainties of xi.

If all xi uncertainities are the same (say dx), the least squares sum sum(((xfi-xi)/dxi)^2) reduces to dx*sum((xfi-xi)^2) and so the minimization should give the same result as if there was no uncertainity on xi. I think.



reply via email to

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