Generalized Linear Models are fit in much the same way as regression
models. Use the glm
command and specify the family of model
to fit (for instance poisson or binomial). Arguments like subset=
and data=
demonstrated above work in exactly the same way
for generalized linear models. It is possible to perform linear
regression in this format, by using glm
with family=gaussian
.