Mixed generalized linear models 

Generalized linear models are a set of techniques that generalizes the linear regression model (which assumes that the dependent variable is Gaussian) into a wide variety of distributions for the response variable. This response can no longer be Gaussian, but can belong to any distribution that is part of the so-called exponential family. In fact, there are many distributions that fall into this category, such as the binomial, gamma, Poisson, or negative binomial distributions. This fact allows us to work with a wide array of situations, such as with count data, or binary responses, and so on. 

Generalized linear models (referred to as GLMs in the literature) are defined by three things: first, a linear predictor that relates the covariates with the response variable; second, a probability distribution for the dependent variable from the exponential distribution; and finally, a link function that connects the linear predictor defined previously to the expected value of the response. Usually, these models are estimated using maximum likelihood.

GLMs formulated in the classical way are defined just over fixed effects. A coefficient is estimated for each variable, which relates each one of them to the expected values of the response. We can then get confidence intervals for each coefficient, but the underlying assumption behind OLS stills holds here: we assume that each observation is independent from the rest, and the effects that we estimate are population effects (conceptually, averages for all the population). 

These models can be extended to accommodate for correlated observations belonging to the same subjects. The concept is the same one that we used for linear mixed effect models: for each variable (and intercept) we can define a random effect that varies per subject. As a consequence, the total effect for a variable can be decomposed as a fixed part and a random part. There is still an important consideration here: because the link function connecting the linear predictor to the target variable is generally nonlinear (except for the obvious exception of Gaussian models, which are just normal OLS models), the interpretation of each effect (whether fixed or fixed and random) is much harder.

GLMs that incorporate random effects are referred to generalized linear mixed models (GLMMs) and can be fitted using the lme4 packages. In this recipe, we will show how to work with a Poisson distribution, although there are several other ones supported by this package. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.238.160