[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linear regression
From: |
Robert A. Macy |
Subject: |
Re: linear regression |
Date: |
Mon, 24 Apr 2006 14:35:28 -0700 |
Myriam,
for linear well behaved functions, I use...
>> coeff = polyfit(x, y, 1);
with x and y being same size vectors.
ols.m was mentioned and is also in 2.1.50a binary version
of octave, but I've never tried it.
If x and y both contain noise, and/or are not monotomic,
with some help from people here I wrote my own linear
regression called:
splatterfit.m
It returns the same coefficients [well inversed
coefficients] whether x or y are interchanged, In other
words a line through your data set is exact.
- Robert -
On Mon, 24 Apr 2006 15:43:41 -0400
Myriam Abramson <address@hidden> wrote:
>
> How can I run a simple least-square regression in Octave?
>
>
> myriam