Multivariate nonlinear (polynominal) regression
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi,
I would like to know if MATLAB does any multivariate (NOT multivariable) nonlinear regression. The 'mvregress' command only carries out a linear multivariate regression (with no squared or interaction terms). To put it simply, say if I had 2 response variables, y1 and y2, and 3 input variables, x1, x2, x3. I would like to have the regression in a way where y1 and y2 are described by x1, x2 and x3 using linear as well as squared and interaction terms. Is this possible in MATLAB?
Thanks
댓글 수: 2
the cyclist
2014년 9월 30일
Just to clarify one important point. The word "linear" in a linear regression refers to linearity in the coefficients, not the variables. You can makes a linear regression in which x1.^2 or x1.*x2 are explanatory variables.
John D'Errico
2014년 10월 1일
Yes. This is a LINEAR regression. The regress tools all handle interaction terms, you just need to build them as such.
For example, if you had a model of the form
z(x,y) = a + b*x + c*y + d*x*y + e*x^2 + f*y^2
this is not a nonlinear regression. You simply supply predictors of the form x, y, x*y, x^2, y^2. Some tools require you to supply a column of ones to dictate a constant term, others presume the constant term is there, and add it for you.
답변 (2개)
John D'Errico
2014년 9월 30일
Polyfitn. It is on the file exchange.
댓글 수: 2
the cyclist
2014년 9월 30일
편집: the cyclist
2014년 9월 30일
Will polyfitn() handle more than one response (i.e. "Y") variable? I had originally suggested nlinfit(), but realized that it does not.
John D'Errico
2014년 10월 1일
If you have multiple response variables, then this is simply multiple regressions since it will require separate sets of regression coefficients. Just use a loop.
the cyclist
2014년 9월 30일
You might find my and others' answers in this question to be useful to your understanding of mvregress.
댓글 수: 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!