# How to Perform a Linear Regression Analysis in Prism

Essential Statistics

This video walks you through the steps required to perform linear regression analysis of a data set in Prism.

You will learn how to:

• Select the appropriate analysis choices
• Navigate the results tab of the analysis
• Plot confidence or prediction bands
• Format and annotate graphs of your results

This ...

This video walks you through the steps required to perform linear regression analysis of a data set in Prism.

You will learn how to:

• Select the appropriate analysis choices
• Navigate the results tab of the analysis
• Plot confidence or prediction bands
• Format and annotate graphs of your results

This video is part of the Essential Statistics series, presented by Dr James Clark, from the School of Cardiovascular Medicine and Sciences at King’s College London.

Transcript:

Hello. I'm James Clark from Kings College London and in this short video, I'm going to run through the steps needed to undertake linear regression analysis of a dataset in Graph Pad Prism. Prism allows you to analyze linear regression from either a single or multiple datasets with shared or individual X axes. In this example, we've used data from a fictitious experiment carried out over eight minutes. We have collected data from two groups. Data one and data two and collected three replicates for each time point. You will note that at several time points that we only have two replicates. This is because we fail to capture data at that point for one of our replicates. This is okay. As Prism will take this into account when we decide how to do our linear regression.

We can view our data as a graph by clicking on the graph tab and you can see we have formatted this graph to show the data as a scatterplot, showing time on the X axis and our response units on the Y axis. You can see from these data that there is a rough correlation between response and time in both datasets, but it appears that data one has a lower reaction to data two. So, what we want to do is perform a linear regression analysis on both datasets, compare the slopes of the lines against zero to confirm that there is a relationship and then compare the slopes of the two lines together to confirm that one and two are different in their actions. In order to undertake linear regression analysis of our data, we will need to use a linear regression analysis tool. You can access this tool from the menu bar on the analysis pane.

The first icon is linear regression and the second icon is nonlinear regression. The third icon is for interpolating data from a standard curve. Since we hypothesized that our data is related in the linear fashion, we want to click on the linear regression line. As in all statistical tests in Graph Pad Prism, the first window that will appear is your parameters window. There is only one page of options for linear regression and these are shown on the screen now. If we wanted to interpolate our knowns from a standard curve, we can do so using the first option. However, we do not wish to do this. However, we do want to compare whether the slopes and intercepts are significantly different from each other.

So, we click on this option. This is similar to running an ANCOVA analysis of your data. There are a few options for graphing. The first of which is whether we want to show the 95 or 90% confidence intervals alongside the best fit line. For the purposes of this demonstration, we'll select this and we will choose our 99% confidence bands. It will plot these as a dotted and shaded area behind the linear regression line. If we wish to force our data to go through an X or Y value, we can do so in the constrain section. These data however do not need this constraint.

The fifth option is a very interesting option. During the regression analysis, the software can calculate each Y value as an individual point or only consider the mean Y values of your dataset. Since we have some missing values here, I'm going to choose to consider each replicate Y value as an individual point so it'll take each point into consideration when it calculates the regression. We can also test the departure familiarity using a replicates test. We can also choose where our linear regression range is since our dataset runs from one to eight minutes in both groups I'm going to leave this on auto and it'll automatically fill a regression line across our dataset. If you wanted to interpolate data from your regression line either beyond the upper or lower limits, you could select these using these two selection boxes here.

Whilst there is a more choices button down the bottom, if you click on this, Prism will tell you that there are no more choices for linear regression and should you wish to have more options, you should choose a nonlinear regression. We're going to stick with linear regression. A useful function of Prism is if you are carrying out multiple tests on multiple locations and you want to use the same parameters for each test, you can click on the make these choices as default for future regressions and Prism will remember these as your default settings. This doesn't mean you can't change them, but it just means that this window will be set up the same way each time.

I'm going to leave this selected. Once you've made sure your selections are correct, you can click on okay. You will see immediately on your graph window that Prism has automatically overlayed a linear regression line on both our datasets and it has plotted a dotted line representing the 99% confidence intervals that we selected in the dialog box. From this dataset, you can see that the gradients of the lines appear to be different and the lines do not appear to intercept. However, this doesn't tell us very much statistically about these lines although it is visually appealing. In order to see the results of your linear regression, you need to click into the results tab under linear regression.

The linear regression results tab is divided into two pages. The first are the tabular results of the linear regressions for each of our datasets as shown here in column A and B as data one and data two. The second pane ask the question whether the lines are different using the ANCOVA analysis. So, we can briefly examine the regression of each of our lines. Data one and data two by scrolling down the list of data on the screen. For most people, the R squared value is important. It shows the goodness of fit and you can see here our R squared value is .92 and .96 and this shows a fairly good correlation. Below that, we can see the F value for the test that tests whether the slope is significantly nonzero.

It also shows the P value of this slope and in both cases here, Prism is telling us that our lines are significantly nonzero. In other words, we have some kind of relationship between our X and our Y data. Below there, we can see the equation of our line and you can copy and paste this onto your graph should you wish to show this. Underneath, it just reinforces the datasets that we have entered. Including the number of missing values. So, we've now determined that these lines have a relationship. There's a fairly good goodness of fit but we do not know whether group one and group two are different from each other.

To understand this, we can click on the second tab. What is nice about Prism is it gives you a commentary. It actually tells you what you want to know and you can see here that it's asked the question are the slopes equal, it gives you the F value and the P value and then underneath it says if the overall slopes were identical, there is less than a nought point nought 1% chance of randomly choosing data points with slopes this different. You can conclude that the differences between the slopes are extremely significant. It's nice that Prism tells you this in plain English. It's quite often the statistical programs give you a P value and an F value and a whole load of other information but don't actually tell you what their data mean.

So, we can conclude from this regression analysis of our data here that our slopes are significantly nonzero. In other words, they have a slope and that data A and data B are different from each other. Prism has some annotation tools and by using the drawing tool and by using the lines with text, we can draw a vertical line between these two datasets and insert a star to show that their are significantly different from each other.

While this regression analysis has merely analyzed the two datasets, in order to compare each of the data points in this response curve, we would need to undertake a two way ANOVA and this will be the topic of another tutorial.