[Top][All Lists]

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

Linear Regression with weights

From: Sebastian Canagaratna
Subject: Linear Regression with weights
Date: Wed, 17 Feb 2010 23:07:33 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20090823 SeaMonkey/1.1.18

I am using Octave in Debian Lenny; the optim package is 1.0.3

I am having problems with LinearRegresssion with weights. I gave the weights as 1/sigma_i^2. Thus is a data point was 1.56 +/- 0.025, the plus or minus giving the error, I gave the wt of the point as 1/0.025^2. this gives the parameters p OK but the errors in the p and also y_var are very large. I looked at the code, and there is a weight^4 in the code. Is this right. Or am I expected to the give the weight as 1/0.025: a reading of the code in leasqr seems to suggest this. This is off course not the way in which the terms weights are used in physics and chemistry as far as I know. I would appreciate some help on this.


reply via email to

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