Plotting Least Squares Regression

Ciaran Mooney general.mooney at googlemail.com
Fri Dec 7 18:18:13 CST 2007


Evening,

I had previous trouble trying to import data and finding the integral.
That is now sorted with a few peoples help and I am confident how to
do it.

My next problem is finding the line of best fit for a set of data. I have found

 [beta, sigma, r] = ols (x,y)

And this seems to be the command that I need. Though I can't seem to
fathom what its actually giving me. I think beta is the gradient, and
sigma is possibly an intercept. (These are the values I'm used to
getting out of a program).

I'm fuzzy with the details, and thats where I need help.

Also how would I go about plotting y=mx+c for the values I get out?

Thanks again,

Ciarán



More information about the Help-octave mailing list