Sometimes linear regression doesn’t quite cut it – particularly when we believe that our observed relationships are non-linear. For this reason, we should turn to other types of regression. This page is a brief lesson on how to calculate a quadratic regression in Jamovi. As always, if you have any questions, please email me at MHoward@SouthAlabama.edu!
The typical type of regression is a linear regression, which identifies a linear relationship between predictor(s) and an outcome. Sometimes our effects are non-linear, however. In these cases, we need to apply different types of regression.
A common non-linear relationship is the quadratic relationship, which is a relationship that is described by a single curve. In these instances, the relationship between two variables may look like a U or an upside-down U. Often, we call the latter of these relationships (the upside down U) a “too much of a good thing” effect. That is, when one variable goes up, then the other goes up too; however, once you get to a certain point, the relationship goes back down. For example, conscientiousness may relate to life satisfaction. If you are hard working, then you are generally happier with your life. However, once you get to a certain level of conscientiousness, your life satisfaction might go back down. If you are too hard working, then you may be stressed and less happy with your life.
There is more that could be stated about quadratic regression, but we’ll keep it simple. To calculate a quadratic regression, we can use Jamovi. If you don’t have a dataset, you can download the example dataset here. In the dataset, we are investigating the relationship of conscientiousness and life satisfaction.
Also, this file is in .xls format, but Jamovi cannot open this format. To learn how to change this .xls file to a .csv file, which Jamovi can open, please click here. Also, the pictures below are a little small on the page. Click on the link above each picture to view a larger version of the picture in a new window.
The data should look something like this:
If your dataset looks differently, you should try to reformat it to resemble the picture above. The instructions below may be a little confusing if your data looks a little different.
Typically, I suggest making a scatter plot to ensure that your data has a U shape. Jamovi does not have a great tool to make a scatter plot, however. So, you could try making this chart first in Excel or SPSS to visualize this U shape. Because we know that we want to perform a quadratic regression, however, we are going to continue with performing our analysis.
To perform a quadratic regression, we first need to create a new variable. To do so in Jamovi, we click on the “Data” tab and then we click on the “Compute” button. To follow the pictures below, exactly, you are going to want to click and highlight the very first cell before pressing these other buttons, as seen in the image below.
The following window should pop up, and you should have a new column appear.
We want to create a variable that is conscientiousness-squared, which will be our quadratic term. Let’s begin by labeling our new variable “C_Squared”. To do so, delete the B in the box seen above, and replace it with the text, “C_Squared”..
Now, we need to tell Jamovi how to calculate this new variable. Because we want it to be conscientiousness squared, we can do this by typing the following in the window seen below: Conscientiousness * Conscientiousness . After doing so, click anywhere for it to calculate.
Now we want to click on the arrow in a circle to minimize this window.
And then click on the “Analysis” tab and the “Regression” button.
Click on “Linear Regression”.
You should get a window that looks like the one below:
From here, we want to identify our outcome variable in Jamovi, which is Life Satisfaction in this example. To do so, click on Life Satisfaction, and the click on the right-facing arrow next to the “Dependent Variable” box.
Next, we want to identify our two predictor variables. To do so, we want to move Conscientiousness as well as C_Squared into the covariates box. You can either do this one at a time, or you can select them both and move them both at once. Either way, you want to move both Conscientiousness and C_Squared to the “Covariates” box by clicking the right-facing arrow beside it.
From here, these is one last thing that we want to do. We should obtain our standardized estimates. To get these, we should click on the “Model Coefficients” tab.
A new window should pop open. In this new window, click on the box next to “Standard estimate”.
And then let’s go ahead and close that window by clicking on the “Model Coefficients” tab again.
And now your window should look like this:
Take a look at my results. Did you get the same findings? If so, great! If not, go back through the steps and see where your results diverged. If your rows are reversed (Conscientiousness on top and C_Squared on bottom), that is completely okay. It will not influence your results whatsoever. In fact, if I were to report this in a journal article, I would probably put C_Squared on the bottom row and Conscientiousness above it.
With that noted, let’s take a look at our results. Our R^2 value was .78, which means that 78% of our variance is explained by our predictors. That’s a lot of variance!
Next, let’s look at the p-values. The p-value associated with conscientiousness is < .0001, which means the linear effect of conscientiousness is statistically significant. However, we should also look at the effect of C_Squared before we interpret this result. The p-value associated with C_Squared is < .0001, which means the quadratic effect of conscientiousness is statistically significant. Typically, we only interpret the higher-order effect when assessing quadratic relations. Therefore, we would say that we observed a significant quadratic effect between conscientiousness and life satisfaction, and we would not note the linear effect.
To understand the nature of this effect, we would then graph the relation. To do so, I would then turn to Excel or SPSS, as Jamovi does not have a great function for this. Or, at least, I do not know it. If you know how to make the relevant graph using Jamovi, please let me know by emailing MHoward@SouthAlabama.edu. Likewise, feel free to email me for any other reasons!