I want to make a formula that present my model (for a report). The R code for the model is:
gam(infected ~ area + s(doy,by=area) + s(clength, by=area) + s(year,bs="re"), family=binomial(link="logit")
I have looked at others and think the below formula is accurate but am uncertain about the handling of interaction terms and random effect as subscript. Would like to be sure before i include it in the report:
Logit(πij) = β + fareaij + fk(doyij) + fk(clengthij)+ai
where j and k denote year and area respectively.
Thanks for corrections or other sugestions.