From 5c49399c54e6ad2b36d282cdecb42ef4b5d00753 Mon Sep 17 00:00:00 2001 From: Craig Gower-Page Date: Wed, 16 Oct 2024 13:51:56 +0100 Subject: [PATCH] Release 1.3.0 (#453) Closes #452 --- DESCRIPTION | 2 +- NEWS.md | 24 +++++++++++++--- cran-comments.md | 28 ++++--------------- .../antidepressant_trial.R | 2 +- misc/simulation/run_simul.R | 2 +- tests/testthat/test-parallel.R | 2 +- vignettes/advanced.html | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3d03277b7..7e05dc5da 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rbmi Title: Reference Based Multiple Imputation -Version: 1.2.6.0001 +Version: 1.3.0 Authors@R: c( person("Craig", "Gower-Page", email = "craig.gower-page@roche.com", role = c("aut", "cre")), person("Alessandro", "Noci", email = "alessandro.noci@roche.com", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index 1c2f02e45..da702acbb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,15 +1,31 @@ -# rbmi (development version) +# rbmi 1.3.0 + +## Breaking Changes + +* Convert `rstan` to be a suggested package to simplify the installation process. This means that the Bayesian imputation functionality will not be available by default. To use this feature, you will need to install `rstan` separately (#441) +* Deprecated the `seed` argument to `method_bayes()` in favour of using the base `set.seed()` function (#431) + +## New Features * Added vignette on how to implement retrieved dropout models with time-varying intercurrent event (ICE) indicators (#414) -* Added documentation clarifying potential false-positive warnings from rstan (#288) -* Include vignette on how to obtain frequentist and information-anchored inference with conditional mean imputation using `rbmi` (#406) -* Added FAQ vignette (#407) +* Added vignette on how to obtain frequentist and information-anchored inference with conditional mean imputation using `rbmi` (#406) +* Added FAQ vignette including a statement on validation (#407 #440) * Updates to `lsmeans()` for better consistency with the `emmeans` package (#412) * Renamed `lsmeans(..., weights = "proportional")` to `lsmeans(..., weights = "counterfactual")`to more accurately reflect the weights used in the calculation. * Added `lsmeans(..., weights = "proportional_em")` which provides consistent results with `emmeans(..., weights = "proportional")` * `lsmeans(..., weights = "proportional")` has been left in the package for backwards compatibility and is an alias for `lsmeans(..., weights = "counterfactual")` but now gives a message prompting users to use either "proptional_em" or "counterfactual" instead. +* Added support for parallel processing in the `analyse()` function (#370) +* Added documentation clarifying potential false-positive warnings from rstan (#288) +* Added support for all covariance structures supported by the `mmrm` package (#437) +* Updated `rbmi` citation detail (#423 #425) + +## Miscellaneous Bug Fixes + +* Stopped warning messages being accidentally supressed when changing the ICE type in `impute()` (#408) +* Fixed equations not rendering properly in the `pkgdown` website (#433) + # rbmi 1.2.6 diff --git a/cran-comments.md b/cran-comments.md index f4bd87bb0..7e7d50445 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,27 +1,11 @@ ## Summary of Submission -This version (v1.2.6) adjusts our unit tests to fix a false positive test failure on CRANs -Clang Fedora/Debian servers. +This version of the package adds two new vignettes as well as additional parallel processing support. It also includes a number of minor bug fixes and updates to the documentation. -## R CMD check results - -There were no ERRORs or WARNINGs. - -There were 2 NOTEs: - -❯ checking installed package size ... NOTE - installed size is 55.6Mb - sub-directories of 1Mb or more: - libs 54.3Mb - -- This is a consequence of using Rstan which produces quite large binaries when compiled. As far as I'm aware there is no way for us to reduce this and is dependent on the Stan development team. Our understanding from the [developers](https://discourse.mc-stan.org/t/using-rstan-in-an-r-package-generates-r-cmd-check-notes/26628) is that this is acceptable to ignore. +## R CMD check results -❯ checking for GNU extensions in Makefiles ... NOTE - GNU make is a SystemRequirements. - -- This is a consequence of using Rstan which requires us to use GNU make to compile the Stan model as per their package usage instructions which can be found [here](https://cran.r-project.org/web/packages/rstantools/vignettes/minimal-rstan-package.html). - +There were no ERRORs, no WARNINGs and no NOTEs. ## Test environments @@ -29,10 +13,10 @@ There were 2 NOTEs: The package was tested in the following environments: - MacOS, R release (Local Machine) -- Fedora, R devel (Local Machine via Docker & Rhub) -- Debian, R release (Local Machine via Docker) - Windows, R release (Win-Builder) -- Ubuntu, R release (GitHub Actions) +- MacOS, devel (macOS builder) +- Ubuntu 22.04 LTS, devel (Rhub / GitHub Actions) + ## Downstream dependencies diff --git a/misc/antidepressant_analysis/antidepressant_trial.R b/misc/antidepressant_analysis/antidepressant_trial.R index 40a362a73..70d171195 100644 --- a/misc/antidepressant_analysis/antidepressant_trial.R +++ b/misc/antidepressant_analysis/antidepressant_trial.R @@ -356,4 +356,4 @@ saveRDS(ret_obj$results, file = "Results/results3.rds") saveRDS(ret_obj$draws_obj, file = "Results/draws_obj3.rds") saveRDS(ret_obj$times, file = "Results/times3.rds") -# results can be seen at Wolbers et al 2021 (https://arxiv.org/abs/2109.11162, table 1) +# results can be seen at Wolbers et al 2022 (https://doi.org/10.1002/pst.2234, table 1) diff --git a/misc/simulation/run_simul.R b/misc/simulation/run_simul.R index 3a93bc64b..a7ca76f65 100644 --- a/misc/simulation/run_simul.R +++ b/misc/simulation/run_simul.R @@ -306,4 +306,4 @@ parallel::mclapply(seq.int(N), runsim, H0=TRUE, mc.cores = parallel::detectCores li <- list.files('Results', pattern = '.*\\.rds$', full.names = TRUE) saveRDS(bind_rows(lapply(li, function(X) unlist(readRDS(X)))), file = "results.rds") -# results can be seen at Wolbers et al 2021 (https://arxiv.org/abs/2109.11162, tables 2,3) +# results can be seen at Wolbers et al 2022 (https://doi.org/10.1002/pst.2234, tables 2,3) diff --git a/tests/testthat/test-parallel.R b/tests/testthat/test-parallel.R index 1b428bea7..d9567a3f8 100644 --- a/tests/testthat/test-parallel.R +++ b/tests/testthat/test-parallel.R @@ -211,7 +211,7 @@ test_that("Creation and management of user defined clusters works as expected", # Check that function can be run (e.g. all elements are correctly exported) set.seed(1223) - cl1 <- make_rbmi_cluster(2, list(inner_fun = inner_fun, e = e), c("lubridate", "nlme")) + cl1 <- make_rbmi_cluster(2, list(inner_fun = inner_fun, e = e), c("lubridate", "nlme", "dplyr")) res_1_a <- parallel::clusterCall(cl1, rnorm, 200) res_1_b <- parallel::clusterApplyLB(cl1, c(4, 5), outer_fun) expect_equal(res_1_b, list(34, 35)) diff --git a/vignettes/advanced.html b/vignettes/advanced.html index 6e47d026b..bed524352 100644 --- a/vignettes/advanced.html +++ b/vignettes/advanced.html @@ -714,7 +714,7 @@

6 Custom imputation strategies#> pars <- list(mu = mu, sigma = sigma) #> return(pars) #> } -#> <bytecode: 0x7f904526d7c0> +#> <bytecode: 0x7fd89cc34720> #> <environment: namespace:rbmi>

To further illustrate this for a simple example, assume that a new strategy is to be implemented as follows: - The marginal mean of the imputation distribution is equal to the marginal mean trajectory for the subject according to their assigned group and covariates up to the ICE.