Remove intercept with "regress"

3 ビュー (過去 30 日間)
Dan Pron
Dan Pron 2015 年 4 月 17 日
回答済み: Dan Pron 2015 年 4 月 17 日
Hello everyone!
I would like to run a multiple linear regression, but dont want any intercept in the output (i want to remove it, because i'm facing a multicolinearity issue). Can someone help me? Here is a piece of my code :
[b17, bint17,~,~,stats17] = regress(TrimROA, [ones(length(TrimROA),1) TrimOPEXP_LP TrimBPSM TrimWO TrimCPB TrimDEBT_EQU],0.1)
Thanks a lot!

回答 (2 件)

Chris McComb
Chris McComb 2015 年 4 月 17 日
I think that all you need to do is remove the first column from your second argument (i.e. the column of 1's).
[b17, bint17,~,~,stats17] = regress(TrimROA, [TrimOPEXP_LP TrimBPSM TrimWO TrimCPB TrimDEBT_EQU],0.1)

Dan Pron
Dan Pron 2015 年 4 月 17 日
Thanks, but i still have an issue^^. I removed the column of ones :
ones(length(TrimROA),1)
But i got this error message now :
Warning: R-square and the F statistic are not well-defined unless X has a column of ones.
Type "help regress" for more information.
> In regress at 163
This is a problem, because i need to have a reliable R-square for my work. Any idea?

カテゴリ

Help Center および File ExchangeLinear Regression についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by