Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Multiple Polinomial Regression

  1. Jun 17, 2011 #1
    Hi friends,
    I need to get the surface equation like function f(x,y) that passes through 66 points.
    I attached the file xls where is the points, and a pdf file where is the graphics of the points.

    Can somebody help say me that I have to do for solve it?

    Attached Files:

  2. jcsd
  3. Jun 17, 2011 #2

    Does the approximation need to truely go through each of the data points (that is, approximate exactly at the data points) or is a more general approximation acceptable (one where the predicted values approximates the data at the data points)?

    The former would generally involve an interpolation approximation while the latter could be treated more simply by, say, Least Squares.
  4. Jun 17, 2011 #3
    I think my friend that using least squares can work, with r2=0.999999. But the same time, I need to graph the surface therefore I have to get the equation of the surface...
  5. Jun 18, 2011 #4
    You can perform a multilinear regression (least squares) using a design matrix consisting of two dimensional monomials.

    For example, a third degree (bi-cubic) approximation can be generated if you consider as basis functions the following:

    [1,x,x^2,x^3, y,yx,yx^2, y^2, y^2x, y^3]

    Construct a design matrix with columns computed with your data using this basis. Then regress. You'll obtain the various coefficents for each term. Examine the degree of fit.

    Your prediction formula would then be:

    \hat{z}(x,y) = g_0(x) + y \, \left(g_1(x) + y \, \left(g_2(x) + g_3(x) \, y \right) \right)
    g_0(x)= c_0+x \, (c_1 + x \, (c_2 + c_3 \, x ))
    g_1(x)= c_4+x \, (c_5 + c_6 \, x)
    g_2(x)= c_7+c_8 \, x
    g_3(x)= c_9

    A higher degree of fit requires a higher order polynomial. But this can have disadvantages as the number of terms can easily grow large. Also, you have to be concerned about the number of data and order of fit as well as the possibilities of numerical ill-condition.

    However, this approach is not difficult. In fact, it can easily be done in Excel. For example, see the enclosed Excel file where I took your file and performed this analysis.

    Attached Files:

  6. Jun 18, 2011 #5
    excelent my friend.... how to use Excel for solve it?
  7. Jun 19, 2011 #6

    There are a couple ways to perform this. You can use the Regression tool from the Analysis Toolpak (which is what I did) or you could just as easily use the LINEST Excel (array) function. The Regression tool will give you a static solution while the LINEST function will give you a dynamic solution (one that changes when inputs change).

    Either one will do the job. Look them up in Excel help.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Multiple Polinomial Regression
  1. Multiple Integrals (Replies: 1)

  2. Multiple integrals (Replies: 12)