Finding the equation for a multiple and nonlinear regression model?

Regarding nonlinear and multivariable regression, I am using R or Matlab. In the case where I have a regression with just two variables, I simply draw the graph Y with respect to X and look for the equation of the model that corresponds the most to the distribution of the point cloud.

However, in the case where Y is connected with several independent variables (in my case 12 variables $$X_1, X_2,...,X_{12}$$). How will I be able to define the equation of the regression model?

This question clearly is the basics of linear regression.

If you are looking for a way to implement linear regression in R, use the lm method.

fit <- lm(y~X1+X2, data = datasetname)

summary(fit)

This should give the coefficients and the p value for each variable.

• But the title is clear, the question is about nonlinear regression. Aug 2 '18 at 10:33
• I apologize. that is not the solution for your question. consider taking interactive terms.
– NAGA
Aug 2 '18 at 19:30