Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Liner Regression
Replies: 10   Last Post: May 27, 2012 1:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Frank

Posts: 115
Registered: 12/27/07
Re: Liner Regression
Posted: May 25, 2012 7:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Loukas " <loukas_lagoudis@yahoo.gr> wrote in message <jpovs7$ntj$1@newscl01ah.mathworks.com>...
> Hi,
>
> I was using excel to run a mulitiple linear regression analysis to predict a dependent variable Y from multiple independent variables. When I am trying to replicate the same regression using matlab " [b,bint,r,rint,stats] = regress(Y,X) "I am taking different results( coefficient, R2 )
>
> Could you please tell me which is the most relevant function to replicate the regression?
> If you have experience using regression in matlab your ideas are welcome ?
>
> My target is to create a multiple linear regression model (OLS) any code is more than welcome !!!!!
>
> Thanks


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

The ?Help? entry for ?regress? includes:

?Note When computing statistics, X should include a column of 1s so that the model contains a constant term. The F statistic and its p value are computed under this assumption, and they are not correct for models without a constant. The R2 statistic can be negative for models without a constant, indicating that the model is not appropriate for the data.?

Did you do that?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.