Skip to content
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

Align Longitudinal Plots API #228

Merged
merged 15 commits into from
Oct 6, 2023
Merged

Conversation

gowerc
Copy link
Collaborator

@gowerc gowerc commented Oct 5, 2023

Closes #227

Main part of this feature was to bring the longitudinal plotting code in line with the survival plotting code. The longitudinal API is now:

long_quantities <- LongitudinalQuantities(
    mcmc_results,
    groups = selected_patients
)
as.data.frame(long_quantities)   # raw samples
summary(long_quantities)         # Summary statistics of raw samples
autoplot(long_quantities)        # Plots 

Behind the scenes I extract out the common elements of the LongitudinalQuantities and the SurvivalQuantites into a dedicated Quantities object that dos the heavy lifting.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Unit Tests Summary

    1 files    26 suites   3m 26s ⏱️
  58 tests   56 ✔️ 2 💤 0
226 runs  224 ✔️ 2 💤 0

Results for commit 1539f90.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

badge

Code Coverage Summary

Filename                       Stmts    Miss  Cover    Missing
---------------------------  -------  ------  -------  ----------------------
R/DataJoint.R                     36       0  100.00%
R/DataLongitudinal.R              71       0  100.00%
R/DataSurvival.R                  45       0  100.00%
R/defaults.R                      13       7  46.15%   27, 45-84, 111
R/generics.R                      10       1  90.00%   69
R/JointModel.R                    46       5  89.13%   93-105
R/JointModelSamples.R             20       0  100.00%
R/Link.R                           6       0  100.00%
R/LinkGSF.R                       63      12  80.95%   109-120
R/LinkNone.R                       3       1  66.67%   36
R/LinkRandomSlope.R               10       0  100.00%
R/LongitudinalGSF.R               23       0  100.00%
R/LongitudinalModel.R             10       0  100.00%
R/LongitudinalQuantities.R        71       8  88.73%   89-96
R/LongitudinalRandomSlope.R       17       1  94.12%   43
R/Parameter.R                     11       0  100.00%
R/ParameterList.R                 27       0  100.00%
R/Prior.R                         63      15  76.19%   49-54, 155-163
R/Quantities.R                    89       0  100.00%
R/simulations_gsf.R               43       0  100.00%
R/simulations_os.R                11       5  54.55%   35-39
R/simulations_rs.R                21       0  100.00%
R/simulations.R                   99       1  98.99%   122
R/StanModel.R                      6       0  100.00%
R/StanModule.R                   145       5  96.55%   188-189, 205, 241, 252
R/SurvivalExponential.R            9       0  100.00%
R/SurvivalLoglogistic.R           10      10  0.00%    31-40
R/SurvivalModel.R                 12       0  100.00%
R/SurvivalQuantities.R           103       6  94.17%   161-166
R/SurvivalWeibullPH.R             10       0  100.00%
R/utilities.R                    146       1  99.32%   13
R/zzz.R                           11      11  0.00%    4-29
TOTAL                           1260      89  92.94%

Diff against main

Filename                      Stmts    Miss  Cover
--------------------------  -------  ------  --------
R/DataJoint.R                    +9       0  +100.00%
R/generics.R                     -1       0  -0.91%
R/JointModelSamples.R           -34       0  +100.00%
R/LongitudinalQuantities.R      +71      +8  +88.73%
R/Quantities.R                  +89       0  +100.00%
R/SurvivalQuantities.R          -53     -17  +8.92%
TOTAL                           +81      -9  +1.14%

Results for commit: 1539f90

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@gowerc
Copy link
Collaborator Author

gowerc commented Oct 5, 2023

@danielinteractive - Ok ready for review, finally got all the cicd checks passing

@danielinteractive danielinteractive self-assigned this Oct 6, 2023
Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gowerc , it is a bit too long for me to review everything, just gave a few general suggestions

R/DataJoint.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
R/LongitudinalQuantities.R Outdated Show resolved Hide resolved
@gowerc
Copy link
Collaborator Author

gowerc commented Oct 6, 2023

@danielinteractive - Apologies, unfortunately most of the outstanding issues are quite chunky 😢 I appreciate this makes reviews quite difficult so I've tried to be a bit more comprehensive with the unit testing and assertions to compensate.

@gowerc gowerc merged commit 15cb79f into main Oct 6, 2023
21 checks passed
@gowerc gowerc deleted the feature/rework_longitudinal_plots branch October 6, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Implement Longitudinal Plots
2 participants