CDCgov / cfa-gam-rt

R package for real-time Rt estimation with penalized splines
https://cdcgov.github.io/cfa-gam-rt/
Apache License 2.0
8 stars 0 forks source link

#8 [1/4]: Dataframe wrangling for class constructor #14

Open zsusswein opened 1 month ago

zsusswein commented 1 month ago

[!IMPORTANT] This PR a trial for using a stacked PR workflow. Do not merge.

This sequence of stacked PRs develops an initial version of the RtGam class constructor. It takes the existing stub function RtGam::RtGam() and builds it to (1) construct an input dataset for model fitting (2) add model fit helpers to build the formula and suggest a basis dimension, (3) actually fit the model, and (4) return it as an RtGam object from the constructor.

This first PR in the sequence focuses on step (1), constructing an input dataset for model fitting. It implements a few group-specific checks as described in #7:

There will be an additional dataset constructor that does input value checking (eg., no repeated dates within groups). I originally intended to put that constructor in this PR, but I decided it made more sense to pause for feedback here in a bite-sized chunk.

The base for this PR is temporarily #13 until it is finalized and merged to main.   Closes #8

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (5ee9a2c) to head (3f2c6e9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #14 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 3 4 +1 Lines 87 146 +59 ========================================= + Hits 87 146 +59 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

zsusswein commented 1 month ago

I'm purposely leaving the NEWS.md check failing to remind us not to merge. Everything else in this first PR in the sequence should be ready for review.