-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support reporting triangle like data #32
Comments
This is definitely in scope for v0.3.0. I'd like to do it sooner, but I think partial pooling is likely higher priority. A few follow-up qs:
Do you think it's cleaner to pass delay day & reference date or report date and reference date? Two sides of the same coin...
This is in addition to the delay spline in the same model fit or as an an alternative version that takes just one vintage and does a nowcast correction to the last
I'd assume region-varying independent fits is required? Are you suggesting like y ~ 1 + s(reference_date, bs = 'ad') + s(reference_date, by = group, bs = 'sz') + s(delay, by = group) And then something clever I need to look into more with a |
Code can be found here: https://github.com/jonathonmellor/norovirus-nowcast/tree/main If I could "do it all again" in my |
Thank you @jonathonmellor! I was reading your manuscript yesterday, but haven't looked at the code yet. I'm excited to check it out.
You mean epinowcast here? Or |
I'll put in an intro chat at some point as well! I mean in the The I don't think there's a nice answer to that problem, but we largely avoid it now by using a Sorry bit of a info dump there, am just really pleased to see more epi GAM work |
While I'm on a roll, worth checking out: eric-pedersen/MRFtools#10 For how to implement a RW1 in Will add a warning that |
That would be great!
I'll make sure this is high-ish on the list. I want to get some minimal usable thing before getting to work on performance, but I'm hoping get that moving here soon!
I hope we can make this useful! It's really been your success with GAMs that got us interested (as I hope the readme makes clear). We're still in very early days, but the dream would be to eventually mature this into something even the experts like you all would find helpful in some capacity.
I remember @seabbs also sharing an interesting thing from that world on time-varying day-of-week effects. I'll go take a look, thanks! |
Late to the party here, but I'd love to talk more at some point about this gp vs spline discussion. In our EpiNow2 modeling, the gp has been the main source of convergence issues and weird fits, so I had been hoping to drop it. We've mostly been able to get away with this by setting the sampler parameters to be really conservative, so the models do usually converge, but occasionally we see:
It sounds like the root issue is the same whether we're working with splines or a gp: the level of smoothness in the data changes over time, and sometimes we'd need an adaptive smoother to match the reported patterns. Would love to chat and compare notes on how best to deal with this in practice! |
Keen to discuss! Have pinged an email over. Part of the challenge might be around what's the purpose of the smoother, is it only smoothing or are we relying on it for extrapolation. Perhaps some of the challenges relate to the length-scale being estimated rather than being a fixed parameter, though that might be mgcv's approximation hiding some problems... But yes fully agree, adaptive smoothers would be really interesting to explore. |
I don't have a strong preference though dates are often easier for the user and indexes are often easier for the dev.
In addition. I think it may act like a prior and enable different delay dists per strata but the same residual spline to be shared which I can see being performant.
Yes
I agree though haven't really played with the
Do you remember where that was @zsusswein. It seems really promising so worth putting into an issue/on peoples radar.
Agree.
and yes fixing the lengthscale (or places a strong prior on it) prevents you seeing issues but at the cost of maybe not learning when things are different that you expect. |
It was this one! Super fun decomposition and I think I missed on my first read that it requires mvgam to work because of the monotonic constraint on the spline |
This would be data that is decomposed into report and reference dates. Current functionality would then be a special case of this.
It would need.
This functionality would be similar to that in
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10538717/#:~:text=In%20May%202022%2C%20cases%20of,travel%20links%20to%20endemic%20regions.
and
https://www.medrxiv.org/content/10.1101/2024.07.19.24310696v1
by @OvertonC and @jonathonmellor and co. Both of these have code and synthetic testing data that have open licences I believe.
The text was updated successfully, but these errors were encountered: