Remove intercept with "regress"
3 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(2 个)
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!