Nonlinear Models
The regression models shown above all produced linear models. In this section, we’ll look at some algorithms for fitting nonlinear models when you know the general form of the model.
Generalized Linear Models
Generalized linear modeling is a technique developed by John Nelder and Robert Wedderburn to compute many common types of models using a single framework. You can use generalized linear models (GLMs) to fit linear regression models, logistic regression models, Poisson regression models, and other types of models.
As the name implies, GLMs are a generalization of linear models. Like linear models, there is a response variable y and a set of predictor variables x1, x2, ..., xn. GLMs introduce a new quantity called the linear predictor. The linear predictor takes the following form:
In a general linear model, the predicted value is a function of the linear predictor. The relationship between the response and predictor variables does not have to be linear. However, the relationship between the predictor variables and the linear predictor must be linear. Additionally, the only way that the predictor variables influence the predicted value is through the linear predictor.
In Example: A Simple Linear Model, we noted that a good way to interpret the predicted value of a model is as the expected value (or mean) of the response variable, given a set of predictor variables. ...
Get R in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.