KNOWLEDGEBASE - ARTICLE #677

How to test for a significant difference between the slopes of two linear regression lines when the intercepts are fixed?

Prism's linear regression analysis can compare the slopes and intercepts of two (or more) lines. Just check the option "Test whether slopes and intercepts are significantly different" at the top of the linear regression dialog. But if you constrain the regression line to go through the origin, that option will not be available. 

To compare two slopes, when you force the lines to go through the origin, requires that you switch from linear to nonlinear regression.  Nonlinear? Yep. Even though you are fitting a straight line, you can do so with the nonlinear regression dialog which offers many more choices. 

  1. From the data table or graph, click analyze and choose nonlinear regression. Or click the nonlinear regression button in the analysis part of the toolbar. 
  2. In Prism 5, choose the equation "line through origin" in the Lines folder of equations. If you are using  4,  choose the equation "Polynomial: First-order (straight line)".  
  3. Skip this step if you are using Prism 5 or later. In Prism 4, force the intercept to be a constant (0.0) under the "Constraints" tab. 
  4. Select the "Comparison" tab and choose "Does the best-fit value of a selected parameter differ between data sets?". Since there is only one parameter in the equation, Slope will be the only choice in the list below.
  5. After Prism fits the lines, check the "Table of results" subpage of the Results sheet for the results of the F test.

Prism will fit the data two ways. It will first share the value of slope, to fit one line to all the data sets. Then it will fit individual slopes to each data set. The F test compares the fits of these models and reports a P value. The P value is based on the null hypothesis that all the slopes are the same. The P value answers the question:

If the slopes truly were the same (in the underlying population), what is the chance that random scatter of data would give us slopes as different, or more different, than actually observed.  

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.