Lm is a fitting method for linear models.
The following syntax is used by this function:
formula, data, and lm
where:
formula: The linear model's formula (for instance, y = x1 + x2)
information: The title of the data frame containing the information
2. GLM - Generalized linear models are fitted using this.
The following syntax is used by this function:
the formula glm(formula, family=gaussian, data,...)
where:
formula: The linear model's formula (for instance, y = x1 + x2)
the statistical family to be applied while fitting the model. Gaussian is the default, although there are also alternatives for binomial, poisson, and Gamma distributions.
information: The title of the data frame containing the information
Keep in mind that the family argument used by the glm() method is the only distinction between these two functions.
If you employ glm or lm() ()
Unleash the power of data with our comprehensive Data Science Training.