필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to create multiple linear regression ? NEED HELP

조회 수: 1 (최근 30일)
Mr LE
Mr LE 2015년 2월 7일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi,
I would like to regress Q with 3 response functions X,Y and Z (like this Q=a+bX+cY+dZ) (Where Q, X, Y and Z are matrice [129x1])
Does anyone know what is the function that can I use for that?

답변 (1개)

the cyclist
the cyclist 2015년 2월 8일
If you have the Statistics Toolbox, you can do this with the mvregress function.
  댓글 수: 2
Mr LE
Mr LE 2015년 2월 8일
편집: the cyclist 2015년 2월 8일
Thanks for your answer!
It works, I have the estimated coefficients of X, Y and Z but I don't have "a" in my regression
This is my code:
X=[g(1).b g(1).c g(1).d g(1).e]
for i=1:10
[h(i).mdl]=mvregress(g(i).DiffReturn,X,'algorithm','ecm');
end
the cyclist
the cyclist 2015년 2월 8일
I believe you need to add a constant vectors of ones to your predictor matrix, to estimate the constant term:
X = [ones(129,1) g(1).b g(1).c g(1).d g(1).e]

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by