Multivariate nonlinear (polynominal) regression
10 次查看(过去 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 中查找有关 Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!