model.lm <- lm(pa ~ WatrCont + Topo, data = mites) fitted(model.lm) # The "fitted()" function gives us expected values for the response variable. # Some values are lower than 0, which does not make sense for a logistic regression. # Let’s try the same model with a binomial distribution instead. # Notice the "family" argument to specify the distribution. model.glm <- glm(pa ~ WatrCont + Topo, data = mites, family = binomial) fitted(model.glm) # All values are bound between 0 and 1.