There are several GLM model families depending on the make-up of the response variable. These includes three well-known GLM model families:
- Binomial: The binomial family is used for binary response variables (i.e., two categories) and assumes a binomial distribution.
R
model <- glm (binary_response_variable ~ predictor_variable1 + predictor_variable2,
family = binomial (link = "logit" ), data = data)
|
- Gaussian: This family is used for continuous response variables and assumes a normal distribution. The link function for this family is typically the identity function.
R
model <- glm (response_variable ~ predictor_variable1 + predictor_variable2,
family = gaussian (link = "identity" ), data = data)
|
- Gamma: The gamma family is used for continuous response variables that are strictly positive and have a skewed distribution.
R
model <- glm (positive_response_variable ~ predictor_variable1 + predictor_variable2,
family = gamma (link = "inverse" ), data = data)
|
- Quasibinomial: When a response variable is binary but has a higher variance than would be predicted by a binomial distribution, the quasibinomial model is utilized. This could happen if the response variable has excessive dispersion or additional variation that the model is not taking into account.
R
model <- glm (response_variable ~ predictor_variable1 + predictor_variable2,
family = quasibinomial (), data = data)
|
Generalized Linear Models Using R
GLM stands for Generalized Linear Models in R Programming Language. It is a flexible framework used in various statistical models, including linear regression, logistic regression, Poisson regression, and many others.
GLMs (Generalized linear models) are a type of statistical model that is extensively used in the analysis of non-normal data, such as count data or binary data. They enable us to describe the connection between one or more predictor variables and a response variable in a flexible manner. This tutorial will go over how to create generalized linear models in the R Programming Language.
Contact Us