Genentech / psborrow2

psborrow2: Bayesian Dynamic Borrowing Simulation Study and Analysis
https://genentech.github.io/psborrow2/
Other
16 stars 2 forks source link

mcmc_sample for simulation pass dots #217

Closed gravesti closed 1 year ago

gravesti commented 1 year ago

Pass additional arguments to cmdstanr's $sample()

github-actions[bot] commented 1 year ago

badge

Code Coverage Summary

Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  -----------------
R/add_covariates.R                        10       0  100.00%
R/analysis_class.R                        41       4  90.24%   90-93
R/bernoulli_prior.R                       16       0  100.00%
R/beta_prior.R                            16       0  100.00%
R/borrowing_class.R                        6       5  16.67%   49-53
R/borrowing_details.R                     14       1  92.86%   88
R/cauchy_prior.R                          16       1  93.75%   69
R/check_data_matrix_has_columns.R         16       0  100.00%
R/cmdstan.R                                6       0  100.00%
R/covariate_class.R                       11      10  9.09%    57-66
R/create_analysis_obj.R                   55       3  94.55%   88-90
R/create_data_matrix.R                    24       0  100.00%
R/create_simulation_obj.R                 63       0  100.00%
R/exp_surv_dist.R                         28       0  100.00%
R/exponential_prior.R                     16       0  100.00%
R/gamma_prior.R                           16       0  100.00%
R/generics.R                               5       3  40.00%   63-87
R/half_cauchy_prior.R                     22       0  100.00%
R/half_normal_prior.R                     22       0  100.00%
R/helpers.R                               90       2  97.78%   24, 58
R/logistic_bin_outcome.R                  20       0  100.00%
R/make_analysis_object_list.R             28       0  100.00%
R/make_model_string_data.R                19       0  100.00%
R/make_model_string_functions.R            4       0  100.00%
R/make_model_string_model.R               56       2  96.43%   48, 85
R/make_model_string_parameters.R          21       0  100.00%
R/make_model_string_transf_params.R       10       1  90.00%   29
R/mcmc_sample.R                           99      88  11.11%   73-305
R/mcmc_simulation_result.R                 7       7  0.00%    33-57
R/normal_prior.R                          16       1  93.75%   69
R/outcome_class.R                         15      11  26.67%   89-100
R/poisson_prior.R                         16       0  100.00%
R/prepare_stan_data_inputs.R              24       0  100.00%
R/prior_class.R                           28       8  71.43%   36-40, 60, 62, 77
R/sim_borrowing_list.R                    11       3  72.73%   78-80
R/sim_covariate_list.R                    17       4  76.47%   81-83, 99
R/sim_covariates.R                        29      20  31.03%   127-156
R/sim_data_list.R                         16       3  81.25%   203-205
R/sim_estimate_bias.R                      3       3  0.00%    79-81
R/sim_estimate_mse.R                       3       3  0.00%    79-81
R/sim_is_null_effect_covered.R             6       6  0.00%    78-83
R/sim_is_true_effect_covered.R             6       6  0.00%    82-87
R/sim_outcome_list.R                      11       3  72.73%   76-78
R/sim_samplesize.R                        18       6  66.67%   78-83
R/sim_treatment_list.R                    11       3  72.73%   74-76
R/simulation_class.R                      25      20  20.00%   54-73, 99
R/simvar_class.R                          24       4  83.33%   65-66, 165-166
R/treatment_class.R                        5       4  20.00%   33-36
R/treatment_details.R                      6       0  100.00%
R/trim_data_matrix.R                      11       0  100.00%
R/uniform_prior.R                         16       0  100.00%
R/weib_ph_surv_dist.R                     32       0  100.00%
R/zzz.R                                   19      18  5.26%    3-21
TOTAL                                   1125     253  77.51%

Diff against main

Filename                 Stmts    Miss  Cover
---------------------  -------  ------  --------
R/half_cauchy_prior.R      +22       0  +100.00%
R/half_normal_prior.R      +22       0  +100.00%
R/helpers.R                 +1       0  +0.02%
R/mcmc_sample.R             +1      +1  -0.11%
R/prior_class.R             +2       0  +2.20%
R/uniform_prior.R           -1       0  +100.00%
TOTAL                      +47      +1  +0.89%

Results for commit: ae15128e3aeb1a2264d2d13c4db4ee932a2daae8

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results