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

Different initial values for each mcmc chain #254

Merged
merged 22 commits into from
Feb 6, 2024
Merged

Different initial values for each mcmc chain #254

merged 22 commits into from
Feb 6, 2024

Conversation

gowerc
Copy link
Collaborator

@gowerc gowerc commented Feb 2, 2024

Closes #4

This ended up being quite a bit more complicated than expected, mostly because the init code was kind of scattered all throughout the program.

I think in particular I would appreciate a double checking of the sample functions as the parameterisations differ in a few cases between Stan and R soo need to double check I'm sampling them correctly.

Copy link
Contributor

github-actions bot commented Feb 2, 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                      13       7  46.15%   27, 45-84, 111
R/generics.R                      16       1  93.75%   69
R/JointModel.R                   119       9  92.44%   114-116, 166, 170, 212, 258, 264, 270
R/JointModelSamples.R             54       0  100.00%
R/Link.R                          18       0  100.00%
R/LinkGSF.R                       69      13  81.16%   116-128
R/LinkNone.R                       5       1  80.00%   36
R/LinkRandomSlope.R               11       0  100.00%
R/LongitudinalGSF.R               56       0  100.00%
R/LongitudinalModel.R             17       0  100.00%
R/LongitudinalQuantities.R        85       8  90.59%   100-107
R/LongitudinalRandomSlope.R       20       0  100.00%
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.R                   99       1  98.99%   122
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                           2108      85  95.97%

Diff against main

Filename                       Stmts    Miss  Cover
---------------------------  -------  ------  --------
R/JointModel.R                   +28      +3  -0.97%
R/LongitudinalGSF.R              +16       0  +100.00%
R/LongitudinalRandomSlope.R       -2       0  +100.00%
R/ParameterList.R                 +5       0  +0.32%
R/Prior.R                        +33      +8  -3.39%
R/settings.R                     +11     +11  +100.00%
R/StanModel.R                     +1       0  +100.00%
R/zzz.R                           -9      -9  +100.00%
TOTAL                            +83     +13  -0.48%

Results for commit: 18aaae5

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Feb 2, 2024

Unit Tests Summary

  1 files   35 suites   5m 45s ⏱️
105 tests  80 ✅ 25 💤 0 ❌
780 runs  755 ✅ 25 💤 0 ❌

Results for commit 18aaae5.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 2, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
compile 💔 $14.13$ $+1.51$ $0$ $0$ $0$ $0$
initialValues 👶 $+2.13$ $+414$ $0$ $0$ $0$
misc_models 💔 $21.95$ $+2.51$ $0$ $0$ $0$ $0$
stan_functions 💔 $46.97$ $+5.24$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
Prior 👶 $+0.03$ jmpost.prior_shrinkage_works_as_expected
compile 💔 $14.13$ $+1.51$ compileStanModel_doesn_t_error_if_the_directory_doesn_t_exist
initialValues 👶 $+0.02$ ensure_initial_values_works_as_expected
initialValues 👶 $+0.52$ initialValues_works_as_expected
initialValues 👶 $+1.59$ intial_values_for_fixed_distributions_gives_valid_values
misc_models 💔 $21.95$ $+2.51$ Longitudinal_Model_doesn_t_print_sampler_rejection_messages
stan_functions 💔 $15.79$ $+2.12$ GSF_Identity_Link_Function_works_as_expected
stan_functions 💔 $15.57$ $+1.46$ GSF_SLD_function_works_as_expected
stan_functions 💔 $15.61$ $+1.66$ Normal_Log_Density_functions_work_as_expected

Results for commit abe9d91

♻️ This comment has been updated with latest results.

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 ! nice work

R/JointModel.R Outdated Show resolved Hide resolved
R/LongitudinalGSF.R Outdated Show resolved Hide resolved
R/Parameter.R Outdated Show resolved Hide resolved
R/ParameterList.R Outdated Show resolved Hide resolved
R/ParameterList.R Show resolved Hide resolved
R/ParameterList.R Outdated Show resolved Hide resolved
R/Prior.R Outdated Show resolved Hide resolved
R/Prior.R Show resolved Hide resolved
R/Prior.R Show resolved Hide resolved
vignettes/model_fitting.Rmd Show resolved Hide resolved
@gowerc
Copy link
Collaborator Author

gowerc commented Feb 6, 2024

Also now closes #255

@gowerc gowerc linked an issue Feb 6, 2024 that may be closed by this pull request
@gowerc gowerc merged commit 736cabd into main Feb 6, 2024
23 checks passed
@gowerc gowerc deleted the gowerc/issue4 branch February 6, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants