Fitting Models to Biological Data Using Linear and Nonlinear Regression
Total Page:16
File Type:pdf, Size:1020Kb
Fitting Models to Biological Data using Linear and Nonlinear Regression A practical guide to curve fitting Harvey Motulsky & Arthur Christopoulos Copyright 2003 GraphPad Software, Inc. All rights reserved. GraphPad Prism and Prism are registered trademarks of GraphPad Software, Inc. GraphPad is a trademark of GraphPad Software, Inc. Citation: H.J. Motulsky and A Christopoulos, Fitting models to biological data using linear and nonlinear regression. A practical guide to curve fitting. 2003, GraphPad Software Inc., San Diego CA, www.graphpad.com. To contact GraphPad Software, email [email protected] or [email protected]. Contents at a Glance A. Fitting data with nonlinear regression.................................... 13 B. Fitting data with linear regression..........................................47 C. Models ....................................................................................58 D. How nonlinear regression works........................................... 80 E. Confidence intervals of the parameters ..................................97 F. Comparing models................................................................ 134 G. How does a treatment change the curve?..............................160 H. Fitting radioligand and enzyme kinetics data ....................... 187 I. Fitting dose-response curves .................................................256 J. Fitting curves with GraphPad Prism......................................296 3 Contents Preface ........................................................................................................12 A. Fitting data with nonlinear regression.................................... 13 1. An example of nonlinear regression ......................................................13 Example data ............................................................................................................................13 Step 1: Clarify your goal. Is nonlinear regression the appropriate analysis? .........................14 Step 2: Prepare your data and enter it into the program........................................................15 Step 3: Choose your model.......................................................................................................15 Step 4: Decide which model parameters to fit and which to constrain..................................16 Step 5: Choose a weighting scheme ......................................................................................... 17 Step 6: Choose initial values..................................................................................................... 17 Step 7: Perform the curve fit and interpret the best-fit parameter values ............................. 17 2. Preparing data for nonlinear regression................................................19 Avoid Scatchard, Lineweaver-Burk and similar transforms whose goal is to create a straight line ............................................................................................................................19 Transforming X values ............................................................................................................ 20 Don’t smooth your data........................................................................................................... 20 Transforming Y values..............................................................................................................21 Change units to avoid tiny or huge values .............................................................................. 22 Normalizing ............................................................................................................................. 22 Averaging replicates ................................................................................................................ 23 Consider removing outliers..................................................................................................... 23 3. Nonlinear regression choices ............................................................... 25 Choose a model for how Y varies with X................................................................................. 25 Fix parameters to a constant value? ....................................................................................... 25 Initial values..............................................................................................................................27 Weighting..................................................................................................................................27 Other choices ........................................................................................................................... 28 4. The first five questions to ask about nonlinear regression results ........ 29 Does the curve go near your data? .......................................................................................... 29 Are the best-fit parameter values plausible? .......................................................................... 29 How precise are the best-fit parameter values? ..................................................................... 29 Would another model be more appropriate? ......................................................................... 30 Have you violated any of the assumptions of nonlinear regression? .................................... 30 5. The results of nonlinear regression ...................................................... 32 Confidence and prediction bands ........................................................................................... 32 Correlation matrix ................................................................................................................... 33 Sum-of-squares........................................................................................................................ 33 R2 (Coefficient of Determination)........................................................................................... 34 Does the curve systematically deviate from the data? ........................................................... 35 Could the fit be a local minimum? ...........................................................................................37 6. Troubleshooting “bad” fits.................................................................... 38 Poorly-defined parameters...................................................................................................... 38 Model too complicated ............................................................................................................ 39 4 The model is ambiguous unless you share a parameter .........................................................41 Bad initial values...................................................................................................................... 43 Redundant parameters............................................................................................................45 Tips for troubleshooting nonlinear regression....................................................................... 46 B. Fitting data with linear regression..........................................47 7. Choosing linear regression ................................................................... 47 The linear regression model.....................................................................................................47 Don’t choose linear regression when you really want to compute a correlation coefficient .47 Analysis choices in linear regression ...................................................................................... 48 X and Y are not interchangeable in linear regression ............................................................ 49 Regression with equal error in X and Y .................................................................................. 49 Regression with unequal error in X and Y.............................................................................. 50 8. Interpreting the results of linear regression ......................................... 51 What is the best-fit line?...........................................................................................................51 How good is the fit? ................................................................................................................. 53 Is the slope significantly different from zero? .........................................................................55 Is the relationship really linear? ..............................................................................................55 Comparing slopes and intercepts............................................................................................ 56 How to think about the results of linear regression............................................................... 56 Checklist: Is linear regression the right analysis for these data?............................................57 C. Models ....................................................................................58 9. Introducing models...............................................................................58 What is a model?...................................................................................................................... 58 Terminology............................................................................................................................. 58 Examples of simple models....................................................................................................