by Ken T
Last Updated August 09, 2017 12:19 PM

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}) = β + *f*area_{ij} + *f*_{k}(doy_{ij}) + *f*_{k}(clength_{ij})+*a*_{i}

where *j* and *k* denote year and area respectively.

Thanks for corrections or other sugestions.

- ServerfaultXchanger
- SuperuserXchanger
- UbuntuXchanger
- WebappsXchanger
- WebmastersXchanger
- ProgrammersXchanger
- DbaXchanger
- DrupalXchanger
- WordpressXchanger
- MagentoXchanger
- JoomlaXchanger
- AndroidXchanger
- AppleXchanger
- GameXchanger
- GamingXchanger
- BlenderXchanger
- UxXchanger
- CookingXchanger
- PhotoXchanger
- StatsXchanger
- MathXchanger
- DiyXchanger
- GisXchanger
- TexXchanger
- MetaXchanger
- ElectronicsXchanger
- StackoverflowXchanger
- BitcoinXchanger
- EthereumXcanger