Multiple Linear Stepwise Regression

조회 수: 3 (최근 30일)
Patrick Rungrugeecharoen
Patrick Rungrugeecharoen 2019년 7월 28일
답변: Vimal Rathod 2019년 7월 31일
I'm trying to get MATLAB to do stepwise regression for me and I know there's some functions out there like stepwiselm and stepwiseglm which does this.
My dependent variable is Y.
My independdent variables are X1, X2, X3 etc.
The stepwiselm and stepwiseglm functions im MATLAB gives me a regression model such as
Y = Beta(1)X1*X2 + Beta(2)*X(1) + Beta(3)*X(2) + Beta(4)*X(3) + C
whereas I'm after
Y = Beta(1)*X(1) + Beta(2)*X(2) + Beta(3)*(X3) + C
Tried changing modelspec to constant and linear as well.
Any help would be much appreciated!

답변 (1개)

Vimal Rathod
Vimal Rathod 2019년 7월 31일
You could use the upper and lower parameters in the stepwiselm and stepwiseglm functions to specify the set of independent variable terms to be present in the model equation.
Here is a link to a similar question:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by