Regression Curve Estimation with SPSS


IBM SPSS is one of the widely using Data Analysis software tool. It can be used for predictive analysis and it is armed with many machine learning techniques. Also, it is easy to self-learn.

You have to buy the software although they provide a free trial for a limited time period. It can be downloaded from the following official site.
https://www.ibm.com/analytics/us/en/technology/spss/

In this tutorial, I will demonstrate a simple Regression Curve Estimation. When the data set can be fitted to a linear model, a Regression Curve can be useful.

For example, if the weight of a person increases from January to June, it can be presented in a Regression Curve and we should be able to get the weight at any given month using the regression curve’s equation.
y = ax + c
where,
x = Month
y = Weight
a, c are the constants.

Therefore, our goal is to find the a and c constants by putting the data we have into a curve. At the end when x is given, we can find the y or vice versa.

    1. I have created a dataset with two column representing Months and Weights.
      Data View: To view the dataVariable View: To view the descriptions of each attribute. In this example, you can see that Month is String and Weight is Numeric. 
    2. In order to create a Regression Curve, go to Analyze –> Regression –> Curve Estimation
    3. Curve Estimation window will appear as below. In a curve, the basic components are x and y values. Therefore, here we need to provide those two values.
      y = dependent = the value we want to know through the curve (Weight)
      x = independent = the value we know (Month)
    4. This is important!!! It does not allow the String variables to be added.
    5. Therefore, you should assign a set of numeric values to the String. Go to Transform –> Recode into Different Variables. Here we will assign the values manually as Jan->1, Feb->2..
    6. In the Recode window, a new attribute name should be given. Click on Old and New Values button
    7. The following window will appear and you can assign new numeric values for each old String value. Then click Continue.
    8. Then assign the Name of the Output Variable and click Change. This name will be the new attribute name of the assigned numeric values. Finally, click OK.
    9. New Column will appear as below.
    10. Finally, the Curve Estimation can be done.
      y = dependent = the value we want to know through the curve (Weight)
      x = independent = the value we know (Month)
    11. The Output view will show the Curve with the descriptive tables. You can see how the weights are increasing.
    12. The Model Summary and Parameter Estimates table is what we use to create the final equation. Under Parameter Estimates, you can see the constant and b1 values.
      Also, the R Square value provides how well the model fits the originally given values. When this value is closer to 1, that gives an evidence that the values are fitting closer to the created curve.
      If we put those values into the basic equation y = ax + c,
      a = b1 and c = constant
      Therefore, the final equation is,
      y = 2.171x + 64.733Let’s check the equation by calculating the March weight (given numeric value for March is 3)…
      y = 2.171x + 64.733
      y = (2.171 * 3) + 64.733
      y = 71.246If you consider the original values, weight in March is 71. This gives the evidence that our equation is correct.

So.. What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s