Where is the intercept in regress

12 ビュー (過去 30 日間)
Nuchto
Nuchto 2013 年 6 月 7 日
When you use the "regress" function, where is the intercept?

採用された回答

ARS
ARS 2013 年 6 月 7 日
Hi,
In my limited knowledge, you will have to include a very first column of 'ones' in the independent variables side(matrix). Then use regress function and the very first beta coefficient will be the intercept.
An example is available here:
click on 'Regress' on the page and you will notice "ones" function:
  • X = [ ones(N,1) airqual(:,[18 19 20]) sin(Wd) cos(Wd) airqual(:,22)]*
Hope it helps.
Thanks.
  2 件のコメント
Nuchto
Nuchto 2013 年 6 月 7 日
That makes perfect sense, thanks!
ARS
ARS 2013 年 6 月 7 日
Please "accept" the answer if it works fine.
Thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by