We decomposed the daily values of each weather variable into a long-term average trend (between years), a mean seasonal trend, and a yearly seasonal anomaly component (S2 Fig), modeled using regression splines [42] while controlling for altitude of weather stations. The remaining residual daily values of each station were further modeled using a spatio-temporal covariance structure. For example, temperature T, on given day t, of a given year k at a given trap location s is modeled as:
where fk(k) is the long-term trend over the years (a thin plate regression spline), ft(t) the mean seasonal trend within years (a penalized cyclic cubic regression spline), r(k, t) the mean residual seasonal component, which measures annual anomaly in mean daily values across selected stations, and a is the linear coefficient for the altitude h effect. The spatio-temporal covariance structure Cs, t, fitted independently to the residuals of each weather variable model, allowed us to deal with lack of independence between daily weather data within and between stations, as well as to interpolate to trap locations using kriging. Altitude of trap locations was extracted from a digital elevation models at 90m resolution [43].
http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0185809&utm_source=reddit&utm_medium=ama&utm_campaign=reddit-ama-134
We decomposed the daily values of each weather variable into a long-term average trend (between years), a mean seasonal trend, and a yearly seasonal anomaly component (S2 Fig), modeled using regression splines [42] while controlling for altitude of weather stations. The remaining residual daily values of each station were further modeled using a spatio-temporal covariance structure. For example, temperature T, on given day t, of a given year k at a given trap location s is modeled as:
where fk(k) is the long-term trend over the years (a thin plate regression spline), ft(t) the mean seasonal trend within years (a penalized cyclic cubic regression spline), r(k, t) the mean residual seasonal component, which measures annual anomaly in mean daily values across selected stations, and a is the linear coefficient for the altitude h effect. The spatio-temporal covariance structure Cs, t, fitted independently to the residuals of each weather variable model, allowed us to deal with lack of independence between daily weather data within and between stations, as well as to interpolate to trap locations using kriging. Altitude of trap locations was extracted from a digital elevation models at 90m resolution [43].