I know how to fit generalized linear models (GLMs) and generalized linear mixed models (GLMMs) with glm
and glmer
from lme4 package in R. Being a student of statistics, I'm interested in learning how to fit GLM and GLMM following step-by-step formula bases R codes. I'd highly appreciate if you point out any resource and/or reference in this regard. Thanks in advance.
EDiT
I'd like to do GLM and GLMM step by step using formula as we do LM using matrix approach. Is there any R book or tutorial available that use this approach? Thanks