I hope the distinction between linear and nonlinear equations is clearer and that you understand how it’s possible for linear regression to model curves! It also explains why you’ll see R-squared displayed for some curvilinear models even though it’s impossible to calculate R-squared for nonlinear regression.For instance Analyze attributes data using logit, probit, logistic regression, etc., to investigate sources of variation Logistic Regression Linear and nonlinear regression are actually named after the functional form of the models that each analysis accepts. The nonlinear equation is so long it that it doesn't fit on the graph: Here is an example of a nonlinear regression model of the relationship between density and electron mobility. Weibull growth: Theta1 + (Theta2 - Theta1) * exp(-Theta3 * X^Theta4)įourier: Theta1 * cos(X + Theta4) + (Theta2 * cos(2*X + Theta4) + Theta3 Unlike linear regression, these functions can have more than one parameter per predictor variable. Thetas represent the parameters and X represents the predictor in the nonlinear functions. Here are several examples from Minitab’s nonlinear function catalog. That covers many different forms, which is why nonlinear regression provides the most flexible curve-fitting functionality. If the equation doesn’t meet the criteria above for a linear equation, it’s nonlinear. The easiest way to determine whether an equation is nonlinear is to focus on the term “nonlinear” itself.
While a linear equation has one basic form, nonlinear equations can take many different forms. Here is an example of a linear regression model that uses a squared term to fit the curved relationship between BMI and body fat percentage. You can also use log and inverse functional forms that are linear in the parameters to produce different types of curves. This model is still linear in the parameters even though the predictor variable is squared. For instance, you can include a squared variable to produce a U-shaped curve. While the equation must be linear in the parameters, you can transform the predictor variables in ways that produce curvature. In statistics, a regression equation (or function) is linear when it is linear in the parameters. Response = constant + parameter * predictor +. This constrains the equation to just one basic form: A linear equation is constructed by adding the results for each term. No surprise, right? But what does that really mean?Ī model is linear when each term is either a constant or the product of a parameter and a predictor variable.
Linear regression requires a linear model.
So, if it’s not the ability to model a curve, what is the difference between a linear and nonlinear regression equation? Linear Regression Equations This confusion is understandable because both types can model curves. Since then, I’ve received several comments expressing confusion about what differentiates nonlinear equations from linear equations.
WHAT IS NOT A LINEAR REGRESSION EQUATION EXAMPLE HOW TO
Previously, I’ve written about when to choose nonlinear regression and how to model curvature with both linear and nonlinear regression.