Generating A Multivariate Nonlinear Regression Equation

I am attempting to create a multivariate nonlinear regression equation based on four columns of data. One column, we'll call it Y, is the response data. The other three columns, we'll call them x1, x2, and x3, are the three independent predictor data. When I plot each predictor against Y (Y vs. x1, Y vs. x2, and Y vs. x3), each of the three graphical output appears to have a nonlinear relationship. Their best fit lines are represented by the following equations:
Y = 0.0381*(x1)^2 - 0.6539*(x1) + 6.3541
Y = 0.007*(x2)^2 - 0.1683*(x2) + 4.6706
Y = 0.0227*(x3)^2 - 0.1503*(x3) + 4.3384
Is there a way to generate a single predictive, nonlinear equaton for Y that takes into account all three independent variables (x1, x2, and x3)?
Thanks in advance for your help!

Antworten (2)

Shashank Prasanna
Shashank Prasanna am 4 Mär. 2013

0 Stimmen

Ross, that is still multiple linear regression, although your model may be quadratic (square terms).
Also in your individual fits you exclude possible interactions, therefore its best to work with all the predictors together.
What version of MATLAB do you have? Recent releases have LinearModel.fit:
Where you can specify 'modelspec' (scroll down). You can choose a quadratic spec or maybe interactions and call the function to fit the model.
Unfortunately there is no such thing as a perfect model, therefore you will have to look at the fit statistics: squared errors, R^2 etc to determine if the model is good enough. If not change the model and fit again.
Ross
Ross am 4 Mär. 2013

0 Stimmen

The version of MATLAB is R2008b. I have not dealt with LinearModel.fit but based on it's definition along with using 'modelspec', it sounds feasible. Do you have an example that utilizes the 'purequadratic' or 'quadratic' modelspec?

Gefragt:

am 4 Mär. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by