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!
답변 (2개)
Shashank Prasanna
2013년 3월 4일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!