First off, this is a lot of commits because I've been using GitHub to move code back and forth from my local computer to the HPC—I will squash these when merging this PR likely.
This PR is too big, so that's why I'm going to merge it soon even though it's not quite finished.
In it, I've experimented with different resolutions of data and different values for k provided to the spatial term of a GAM using ti() smoothers (ANOVA style tensor product terms). The basic model is:
DOY ~
ti(x, y, bs = "cr", d = 2, k = k_spatial) +
ti(year_scaled, bs = "cr", k = 20) +
ti(x, y, year_scaled, d = c(2,1), bs = c("cr", "cr"), k = c(100, 20))
where k_spatial is varied in _targets.R using tar_map().
I then take those models and calculate average slopes at a 50km resolution. The results are qualitatively similar—positive trend in the north, negative trend in the south.
After merging this, I will open another PR that cleans up a lot of the "experimental" bits and focuses on producing some preliminary plots for Theresa to give her collaborators.
First off, this is a lot of commits because I've been using GitHub to move code back and forth from my local computer to the HPC—I will squash these when merging this PR likely.
This PR is too big, so that's why I'm going to merge it soon even though it's not quite finished.
In it, I've experimented with different resolutions of data and different values for
k
provided to the spatial term of a GAM usingti()
smoothers (ANOVA style tensor product terms). The basic model is:where
k_spatial
is varied in_targets.R
usingtar_map()
.I then take those models and calculate average slopes at a 50km resolution. The results are qualitatively similar—positive trend in the north, negative trend in the south.
After merging this, I will open another PR that cleans up a lot of the "experimental" bits and focuses on producing some preliminary plots for Theresa to give her collaborators.