These are some notes for the JOSS paper review. In general, I think it's a nice paper and potentially useful package.
Comments regarding the paper:
- A quick question regarding authorship: I noticed that three paper authors don't seem to have a connection with the software, while one contributor to the software isn't included as an author, despite contributing over 1000 lines of new code...?
- Datasets: consider indicating whether the datasets you include are synthetic or real. If they are real, you should cite the sources.
- Figure 1: consider adding a caption to the figure so that it's clear what is shown.
- Example usage: I wonder whether showing and discussing the result of the model would be helpful...?
Specific to the package itself:
- Contributing guidelines: You dont seem to have any guidance on how users can contribute.
- As your package depends on jags, perhaps add it as a system dependency to your DESCRIPTION (see e.g. rjags)
- The helpfile for
summary.BJSM_binary speaks of "Expected Response Rate of Dynamic Treatment Regimens (DTR)" being a value in the output, but i dont see that anywhere (neither in the print nor the object itself)
- The summary method for
BJSM_c objects is less clear than that for BJSM_binary (e.g. V1[1,1]??). Perhaps you can harmonise the summary methods a little (e.g. split the continuous one into three matrices with informative headers as per the binary case)?
# from the helpfile
BJSM_result <- BJSM_c(
data = trialData, xi_prior.mean = c(50, 50, 50),
xi_prior.sd = c(50, 50, 50), phi3_prior.sd = 20, n_MCMC_chain = 1,
n.adapt = 1000, MCMC_SAMPLE = 5000, BURIN.IN = 1000, ci = 0.95, n.digits = 5, verbose = FALSE
)
summary(BJSM_result)
Parameter Estimation:
Estimate CI CI_low CI_high
V1[1,1] 111.63507 0.95 6.070278e+01 168.7209463
V1[2,1] 85.64805 0.95 4.870137e+01 134.8992087
V1[1,2] 85.64805 0.95 4.870137e+01 134.8992087
V1[2,2] 77.70400 0.95 4.277722e+01 119.0750054
V2[1,1] 123.18354 0.95 6.562162e+01 194.7928189
V2[2,1] 29.16360 0.95 -2.018850e+01 77.8351264
V2[1,2] 29.16360 0.95 -2.018850e+01 77.8351264
V2[2,2] 107.75252 0.95 5.664411e+01 173.8732619
phi1 0.18433 0.95 1.234352e-05 0.3853457
phi3 4.00328 0.95 2.654285e+00 5.2424762
xi_[A] 51.10907 0.95 4.725783e+01 54.8613873
xi_[B] 62.04274 0.95 5.842472e+01 66.1343026
xi_[C] 69.05152 0.95 6.529155e+01 72.7509413
(I've just looked at the Hartman paper, and see where the V1 and V2s are coming from, but it would be helpful to have more information in the helpfiles rather than just "see the paper in the references")
- Where you have references in helpfiles, it would be useful to add DOIs and perhaps even hyperlinks
Places for possible improvement that won't influence the review itself
- I would encourage you to set up a pkgdown site, and add the link to your repo settings and description file. It looks like you already had a github action doing part of it (you have a gh-pages branch). Vignettes are also often very helpful and would allow you to expand on your documentation beyond what is possible in the individual helpfiles.
- Testing: You use the testthat package, which is great. I would encourage you to give more meaningful names to your tests (rather than e.g. "BJSM_binary 6"). It looks to me like you may only be testing a very small fraction of the output from your objects (
pi_hat_bjsm). It may be worth testing more components... Further, you could split your tests into multiple files (one per function tested gives a good oversight of whats been tested and what hasn't)
These are some notes for the JOSS paper review. In general, I think it's a nice paper and potentially useful package.
Comments regarding the paper:
Specific to the package itself:
summary.BJSM_binaryspeaks of "Expected Response Rate of Dynamic Treatment Regimens (DTR)" being a value in the output, but i dont see that anywhere (neither in the print nor the object itself)BJSM_cobjects is less clear than that forBJSM_binary(e.g.V1[1,1]??). Perhaps you can harmonise the summary methods a little (e.g. split the continuous one into three matrices with informative headers as per the binary case)?(I've just looked at the Hartman paper, and see where the V1 and V2s are coming from, but it would be helpful to have more information in the helpfiles rather than just "see the paper in the references")
Places for possible improvement that won't influence the review itself
pi_hat_bjsm). It may be worth testing more components... Further, you could split your tests into multiple files (one per function tested gives a good oversight of whats been tested and what hasn't)