Multivariate nonlinear (polynominal) regression

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 comentarios

the cyclist
the cyclist el 30 de Sept. de 2014
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.
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.

Iniciar sesión para comentar.

Respuestas (2)

John D'Errico
John D'Errico el 30 de Sept. de 2014

0 votos

Polyfitn. It is on the file exchange.

2 comentarios

the cyclist
the cyclist el 30 de Sept. de 2014
Editada: the cyclist el 30 de Sept. de 2014
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
John D'Errico el 1 de Oct. de 2014
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.

Iniciar sesión para comentar.

the cyclist
the cyclist el 30 de Sept. de 2014

0 votos

You might find my and others' answers in this question to be useful to your understanding of mvregress.

Preguntada:

el 30 de Sept. de 2014

Comentada:

el 1 de Oct. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by