Poisson Regression
A Poisson regression is another type of GLM. This requires integers or count data (i.e., 0, 1, 2, 3, …). For some situations, a Poisson regression can be more powerful (e.g., detecting statistically significantly trends) than a linear model or "Gaussian" regression.
During this exercise, we're going to build a linear regression using the lm() function and a Poisson regression using glm().
The objects x and y are loaded into R for you.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Hierarchical and Mixed Effects Models in R
अभ्यास निर्देश
- Build an
lm()whereyis predicted byxand then print the summary. - Build a
glm()whereyis predicted byxwith a"poisson"distribution function and then print the summary to the terminal. - Examine the coefficient estimates for each and notice how only the
glm()produces statistically significant estimates forx.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Fit the linear model
summary(lm(___))
# Fit the generalized linear model
summary(glm(___, family = "___"))