# Let’s build a regression model of the presence/absence of a mite species (Galumna sp.) # as a function of water content and topography. # To do this, we need to use the glm() function and specify the family argument. logit.reg <- glm(pa ~ WatrCont + Topo, data = mites, family = binomial(link = "logit")) # The logit function is the default for the binomial distribution, # so it is not necessary to include it in the "family" argument: logit.reg <- glm(pa ~ WatrCont + Topo, data = mites, family = binomial) summary(logit.reg)