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

Add Stein-Fojo Model #265

Merged
merged 32 commits into from
Feb 28, 2024
Merged

Add Stein-Fojo Model #265

merged 32 commits into from
Feb 28, 2024

Conversation

gowerc
Copy link
Collaborator

@gowerc gowerc commented Feb 23, 2024

Closes #171

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 , any chance we can exploit the relationship between SF and GSF? E.g. SF being a special case of GSF?

@gowerc
Copy link
Collaborator Author

gowerc commented Feb 23, 2024

@danielinteractive - I mean almost certainly yes, but when I first attempted to go down that route it just felt like the dynamic code (particularly in the Stan + Jinja side of things) was more of a hassle than just the simple c&p + name changes.

Copy link
Contributor

github-actions bot commented Feb 23, 2024

Unit Tests Summary

  1 files   35 suites   4m 33s ⏱️
107 tests  81 ✅ 26 💤 0 ❌
795 runs  769 ✅ 26 💤 0 ❌

Results for commit ac3fc67.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 23, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
LongitudinalGSF 💚 $59.44$ $-58.27$ $+2$ $0$ $0$ $0$
LongitudinalQuantiles 💚 $42.29$ $-1.29$ $0$ $0$ $0$ $0$
LongitudinalSteinFojo 👶 $+1.11$ $+10$ $+2$ $0$ $0$
stan_functions 💚 $47.58$ $-1.47$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
LongitudinalGSF 💚 $29.31$ $-29.30$ Can_recover_known_distributional_parameters_from_a_full_GSF_joint_model
LongitudinalGSF 💚 $29.51$ $-29.02$ Non_Centralised_parameterisation_compiles_without_issues
LongitudinalQuantiles 💚 $36.59$ $-1.11$ Test_that_LongitudinalQuantities_works_as_expected
LongitudinalSteinFojo 👶 $+0.01$ Can_recover_known_distributional_parameters_from_a_SF_joint_model
LongitudinalSteinFojo 👶 $+0.42$ Centralised_parameterisation_compiles_without_issues
LongitudinalSteinFojo 👶 $+0.11$ LongitudinalSteinFojo_works_as_expected_with_default_arguments
LongitudinalSteinFojo 👶 $+0.46$ Non_Centralised_parameterisation_compiles_without_issues
LongitudinalSteinFojo 👶 $+0.11$ Print_method_for_LongitudinalSteinFojo_works_as_expected

Results for commit fbb1422

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 23, 2024

badge

Code Coverage Summary

Filename                       Stmts    Miss  Cover    Missing
---------------------------  -------  ------  -------  --------------------------------
R/brier_score.R                  166       0  100.00%
R/DataJoint.R                     76       2  97.37%   264, 270
R/DataLongitudinal.R             119       1  99.16%   245
R/DataSubject.R                   69       1  98.55%   124
R/DataSurvival.R                  74       1  98.65%   146
R/defaults.R                      10       6  40.00%   18-57, 84
R/generics.R                      19       1  94.74%   49
R/JointModel.R                   122       8  93.44%   142-144, 194, 198, 240, 286, 292
R/JointModelSamples.R             54       0  100.00%
R/Link.R                          55       4  92.73%   159-162
R/LinkComponent.R                 47       5  89.36%   100, 118, 132-149
R/LongitudinalGSF.R               64       0  100.00%
R/LongitudinalModel.R             35      12  65.71%   68-83
R/LongitudinalQuantities.R        85       8  90.59%   100-107
R/LongitudinalRandomSlope.R       27       0  100.00%
R/LongitudinalSteinFojo.R         57       8  85.96%   113-135
R/Parameter.R                     14       0  100.00%
R/ParameterList.R                 42       1  97.62%   184
R/Prior.R                        236       8  96.61%   480, 576, 588-606
R/Quantities.R                   105       0  100.00%
R/settings.R                      11      11  0.00%    40-53
R/simulations_gsf.R               41       0  100.00%
R/simulations_os.R                11       5  54.55%   35-39
R/simulations_rs.R                21       0  100.00%
R/simulations_sf.R                38      38  0.00%    17-107
R/simulations.R                  101       1  99.01%   128
R/StanModel.R                     15       0  100.00%
R/StanModule.R                   177       6  96.61%   199-200, 242, 253, 388, 416
R/SurvivalExponential.R           10       0  100.00%
R/SurvivalLoglogistic.R           11       0  100.00%
R/SurvivalModel.R                 19       0  100.00%
R/SurvivalQuantities.R           151       6  96.03%   173-178
R/SurvivalWeibullPH.R             11       0  100.00%
R/utilities.R                    145       1  99.31%   13
R/zzz.R                            2       2  0.00%    3-12
TOTAL                           2240     136  93.93%

Diff against main

Filename                     Stmts    Miss  Cover
-------------------------  -------  ------  --------
R/LongitudinalSteinFojo.R      +57      +8  +85.96%
R/simulations_sf.R             +38     +38  +100.00%
R/simulations.R                 +2       0  +0.02%
TOTAL                          +97     +46  -1.87%

Results for commit: ac3fc67

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@danielinteractive
Copy link
Collaborator

Ok for now then. I guess as a future idea one could in general enable "constant" priors as it seems brms also has which is then dynamically generating corresponding transformed parameters code. This could be useful in general and as a side product make GSF with constant prior on the mixture weight give the SF model.

@gowerc gowerc enabled auto-merge (squash) February 28, 2024 14:28
@gowerc gowerc disabled auto-merge February 28, 2024 14:28
@gowerc gowerc merged commit 9029e22 into main Feb 28, 2024
23 checks passed
@gowerc gowerc deleted the gowerc/issue171 branch February 28, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add simplified SF model (that is without the G)
2 participants