I specified a random factor smooth in the following way:
gam(Abundance ~ Genus + s(Time, Farm, by = Genus, bs = "fs"),
REML = FALSE, data = dat)
Partial output from the smoothing terms was:
edf Ref.df F p-value
s(Time,Farm):GenusMethanobrevibacter 22.28 49 13.244 <2e-16 ***
s(Time,Farm):GenusOrnithinimicrobium 22.17 49 45.468 <2e-16 ***
s(Time,Farm):GenusRomboutsia 18.86 49 10.507 <2e-16 ***
s(Time,Farm):GenusStaphylococcus 28.65 49 121.492 <2e-16 ***
s(Time,Farm):GenusTuricibacter 17.81 49 6.271 <2e-16 ***
The random smooth is intended to look at farm variability across genera over time. In this way, can the 'edf' be best described as the amount of farm-to-farm variability of each genus over time?
As an example, would if be fair to say that the genus Romboutsia (edf: 18.8) has less farm-to-farm variability over time than the genus Staphylococcus (edf: 28.6)?