Possibility of Location-Specific Latent Factors #106
Closed
jbogomolovas2
started this conversation in
General
Replies: 1 comment 2 replies
-
Hi @jbogomolovas2, thanks for the nice comments about the package and for the helpful discussion. If I understand correctly, your model_static <- mvgam(
formula = mating_doy ~ 1,
trend_formula = ~ s(latent1, trend bs = "fs", k = 5) +
s(latent2, trend bs = "fs", k = 5) +
s(latent3, trend, bs = "fs", k = 5),
...,
) Please let me know if that is helpful or if I'm not understanding correctly :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First of all big fan of mvgam! My to go package for time series analysis.
As this is not an issue, decided to post in discussion section.
So I have time series from several locations and three predictors-latent factors. Latent factors were derived using PLS ignoring the location. Now I want to use mvgam to "bend" those latent factors to particular location to fit and subsequently predict data better. So I run something like this:
model_static <- mvgam( mating_doy ~ s(latent1, series, bs = "fs", k = 5) + s(latent2, series, bs = "fs", k = 5) + s(latent3, series, bs = "fs", k = 5))
The issue is that some locations have a lot of missing data (bloom_doy; not latent factors) and would benefit from modeling as a state-space model. However it is not possible directly specify such a smooth structure under
trend_formula
. I am wondering is there a smart way around it? Any suggestions would be greatly appreciated.Beta Was this translation helpful? Give feedback.
All reactions