Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took a crack at the bones of a predict method. At the moment it only pulls out observed cases, but it has the machinery to also do incidence, little r, and Rt.
I originally implemented all of the above, but I started to have second thoughts that this was the right way to do things. I wanted to pare things back and get some feedback that this was on the right track before I did all the docs and tests. Accordingly, things are a bit of a mess still -- please ignore tests/docs/correctness for now.
The key thing I want feedback on is extensibility of this design:
predict()
to take a model and an argtype
to generate the value we want. Then I'll handle the indexing and draws stuff. I was thinking each arg would have its own function that could do S3 dispatch under the hood and the functions would be cased with if blocks.Potential solutions:
The other thing I could use advice on is the use of gratia. It's really nice to have the functionality, but it's more of an interactive package and I don't love all the dependences it brings along (but it's mainly dplyr and it doesn't cost that much...)
Closes #47