help-octave
[Top][All Lists]

## Re: question about a function to calculate regression

 From: Michael Creel Subject: Re: question about a function to calculate regression Date: Tue, 13 Jun 2006 09:27:33 +0200 User-agent: Thunderbird 1.5.0.2 (X11/20060522)

I have a simple ols function that does this (except for the F-stat, which would be easy to add):
```http://pareto.uab.es/mcreel/Econometrics/MyOctaveFiles/LinearRegression/mc_ols.m
This is part of a larger project, which might be of interest:
http://pareto.uab.es/mcreel/Econometrics/

Michael

Tracy Feldman wrote:
```
```To whom it may concern:
```
I am trying to conduct a simple regression of two vectors (x and y values--regressing y as a function of x). I had been using the 'regress' function in matlab: [b, bint, r, rint, stats] = regress(y, x);
```
where I am particularly interested in:
```
1. b, which is the vector of parameter estimates for both the slope *and* the intercept (not necessarily zero),
```and
```
2. stats, which is a vector with the R-squared, F, and P values I have been searching through the octave help menu and octave websites, but I have not found anything that seems to do what I want it to do. I may be misunderstanding things, but the function 'gls' does not seem right, as I cannot figure out what it returns that is like an r-squared or a p-value, and it also seems to require the assumption that the line intersects with the origin. If I am right, I would appreciate any help people might offer regarding this issue, and suggestions for functions that might fit the bill. If the function can indeed do what I want it to do, I am not sure how to write the syntax such that it works. Thank you in advance for your help. Sincerely, Tracy S. Feldman Postdoctoral Associate, The Noble Foundation, Ardmore, OK
```__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

------------------------------------------------------------------------

_______________________________________________
Help-octave mailing list
```