Where is the intercept in regress

조회 수: 2 (최근 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 CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by