Skip to content

Commit 182aa40

Browse files
author
Craig Gower-Page
authored
Release v1.3.1 (#464)
Closes #463
1 parent 5e651e4 commit 182aa40

File tree

8 files changed

+30
-26
lines changed

8 files changed

+30
-26
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Package: rbmi
22
Title: Reference Based Multiple Imputation
3-
Version: 1.3.0.9000
3+
Version: 1.3.1
44
Authors@R: c(
55
person("Craig", "Gower-Page", email = "craig.gower-page@roche.com", role = c("aut", "cre")),
66
person("Alessandro", "Noci", email = "alessandro.noci@roche.com", role = c("aut")),
77
person("Marcel", "Wolbers", email = "marcel.wolbers@roche.com", role = "ctb"),
8+
person("Isaac", "Gravestock", email = "isaac.gravestock@roche.com", role = "aut"),
89
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd"))
910
)
1011
Description: Implements standard and reference based multiple imputation methods for continuous

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ importFrom(stats,var)
104104
importFrom(stats,vcov)
105105
importFrom(utils,capture.output)
106106
importFrom(utils,relist)
107+
importFrom(utils,sessionInfo)

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
# rbmi (development version)
2+
# rbmi 1.3.1
33

4-
- No new items yet...
4+
* Fixed bug where stale caches of the `rstan` model were not being correctly cleared (#459)
55

66
# rbmi 1.3.0
77

R/utilities.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,11 @@ ensure_rstan <- function() {
535535
#' Get session hash
536536
#'
537537
#' Gets a unique string based on the current R version and relevant packages.
538+
#' @importFrom utils sessionInfo
538539
#' @keywords internal
539540
get_session_hash <- function() {
540541
pkg_versions <- vapply(
541-
sessionInfo(c("rbmi", "rstan", "Rcpp", "RcppEigen", "BH"))[["otherPkgs"]],
542+
sessionInfo(c("rbmi", "rstan", "Rcpp", "RcppEigen"))[["otherPkgs"]],
542543
function(x) x[["Version"]],
543544
character(1L)
544545
)

cran-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Summary of Submission
22

3-
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.
3+
This version of the package fixes an issue that was causing the unit tests to crash on CRAN. The issue was due to the package not correctly clearing out the cache of previously compiled `rstan` models.
44

55

66
## R CMD check results

man/rbmi-package.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/advanced.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ <h1><span class="header-section-number">6</span> Custom imputation strategies</h
714714
<span id="cb6-17"><a href="#cb6-17" tabindex="-1"></a><span class="co">#&gt; pars &lt;- list(mu = mu, sigma = sigma)</span></span>
715715
<span id="cb6-18"><a href="#cb6-18" tabindex="-1"></a><span class="co">#&gt; return(pars)</span></span>
716716
<span id="cb6-19"><a href="#cb6-19" tabindex="-1"></a><span class="co">#&gt; }</span></span>
717-
<span id="cb6-20"><a href="#cb6-20" tabindex="-1"></a><span class="co">#&gt; &lt;bytecode: 0x7fd89cc34720&gt;</span></span>
717+
<span id="cb6-20"><a href="#cb6-20" tabindex="-1"></a><span class="co">#&gt; &lt;bytecode: 0x7fd7e885e158&gt;</span></span>
718718
<span id="cb6-21"><a href="#cb6-21" tabindex="-1"></a><span class="co">#&gt; &lt;environment: namespace:rbmi&gt;</span></span></code></pre></div>
719719
<p>To further illustrate this for a simple example, assume that a new strategy is to be implemented as follows:
720720
- 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.

vignettes/quickstart.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ <h1><span class="header-section-number">3</span> Draws</h1>
456456
<span id="cb4-57"><a href="#cb4-57" tabindex="-1"></a> <span class="at">method =</span> method,</span>
457457
<span id="cb4-58"><a href="#cb4-58" tabindex="-1"></a> <span class="at">quiet =</span> <span class="cn">TRUE</span></span>
458458
<span id="cb4-59"><a href="#cb4-59" tabindex="-1"></a>)</span>
459-
<span id="cb4-60"><a href="#cb4-60" tabindex="-1"></a><span class="co">#&gt; Warning in fit_mcmc(designmat = model_df_scaled[, -1, drop = FALSE], outcome = model_df_scaled[, : The largest R-hat is 1.06, indicating chains have not mixed.</span></span>
459+
<span id="cb4-60"><a href="#cb4-60" tabindex="-1"></a><span class="co">#&gt; Warning in fit_mcmc(designmat = model_df_scaled[, -1, drop = FALSE], outcome = model_df_scaled[, : The largest R-hat is 1.05, indicating chains have not mixed.</span></span>
460460
<span id="cb4-61"><a href="#cb4-61" tabindex="-1"></a><span class="co">#&gt; Running the chains for more iterations may help. See</span></span>
461461
<span id="cb4-62"><a href="#cb4-62" tabindex="-1"></a><span class="co">#&gt; https://mc-stan.org/misc/warnings.html#r-hat</span></span>
462462
<span id="cb4-63"><a href="#cb4-63" tabindex="-1"></a>drawObj</span>
@@ -697,33 +697,33 @@ <h1><span class="header-section-number">6</span> Pool</h1>
697697
<span id="cb9-20"><a href="#cb9-20" tabindex="-1"></a><span class="co">#&gt; trt_4 -0.092 0.683 -1.439 1.256 0.893 </span></span>
698698
<span id="cb9-21"><a href="#cb9-21" tabindex="-1"></a><span class="co">#&gt; lsm_ref_4 -1.616 0.486 -2.576 -0.656 0.001 </span></span>
699699
<span id="cb9-22"><a href="#cb9-22" tabindex="-1"></a><span class="co">#&gt; lsm_alt_4 -1.708 0.475 -2.645 -0.77 &lt;0.001 </span></span>
700-
<span id="cb9-23"><a href="#cb9-23" tabindex="-1"></a><span class="co">#&gt; trt_5 1.328 0.924 -0.497 3.153 0.153 </span></span>
701-
<span id="cb9-24"><a href="#cb9-24" tabindex="-1"></a><span class="co">#&gt; lsm_ref_5 -4.14 0.66 -5.443 -2.838 &lt;0.001 </span></span>
702-
<span id="cb9-25"><a href="#cb9-25" tabindex="-1"></a><span class="co">#&gt; lsm_alt_5 -2.812 0.646 -4.088 -1.537 &lt;0.001 </span></span>
703-
<span id="cb9-26"><a href="#cb9-26" tabindex="-1"></a><span class="co">#&gt; trt_6 1.939 1 -0.037 3.915 0.054 </span></span>
704-
<span id="cb9-27"><a href="#cb9-27" tabindex="-1"></a><span class="co">#&gt; lsm_ref_6 -6.085 0.718 -7.503 -4.667 &lt;0.001 </span></span>
705-
<span id="cb9-28"><a href="#cb9-28" tabindex="-1"></a><span class="co">#&gt; lsm_alt_6 -4.146 0.699 -5.527 -2.766 &lt;0.001 </span></span>
706-
<span id="cb9-29"><a href="#cb9-29" tabindex="-1"></a><span class="co">#&gt; trt_7 2.136 1.12 -0.078 4.35 0.058 </span></span>
707-
<span id="cb9-30"><a href="#cb9-30" tabindex="-1"></a><span class="co">#&gt; lsm_ref_7 -6.982 0.812 -8.587 -5.377 &lt;0.001 </span></span>
708-
<span id="cb9-31"><a href="#cb9-31" tabindex="-1"></a><span class="co">#&gt; lsm_alt_7 -4.846 0.789 -6.405 -3.287 &lt;0.001 </span></span>
700+
<span id="cb9-23"><a href="#cb9-23" tabindex="-1"></a><span class="co">#&gt; trt_5 1.334 0.926 -0.494 3.162 0.151 </span></span>
701+
<span id="cb9-24"><a href="#cb9-24" tabindex="-1"></a><span class="co">#&gt; lsm_ref_5 -4.151 0.661 -5.457 -2.846 &lt;0.001 </span></span>
702+
<span id="cb9-25"><a href="#cb9-25" tabindex="-1"></a><span class="co">#&gt; lsm_alt_5 -2.817 0.648 -4.097 -1.537 &lt;0.001 </span></span>
703+
<span id="cb9-26"><a href="#cb9-26" tabindex="-1"></a><span class="co">#&gt; trt_6 1.934 1 -0.042 3.91 0.055 </span></span>
704+
<span id="cb9-27"><a href="#cb9-27" tabindex="-1"></a><span class="co">#&gt; lsm_ref_6 -6.088 0.715 -7.501 -4.676 &lt;0.001 </span></span>
705+
<span id="cb9-28"><a href="#cb9-28" tabindex="-1"></a><span class="co">#&gt; lsm_alt_6 -4.155 0.698 -5.533 -2.777 &lt;0.001 </span></span>
706+
<span id="cb9-29"><a href="#cb9-29" tabindex="-1"></a><span class="co">#&gt; trt_7 2.177 1.138 -0.073 4.426 0.058 </span></span>
707+
<span id="cb9-30"><a href="#cb9-30" tabindex="-1"></a><span class="co">#&gt; lsm_ref_7 -7.002 0.827 -8.638 -5.367 &lt;0.001 </span></span>
708+
<span id="cb9-31"><a href="#cb9-31" tabindex="-1"></a><span class="co">#&gt; lsm_alt_7 -4.826 0.783 -6.373 -3.278 &lt;0.001 </span></span>
709709
<span id="cb9-32"><a href="#cb9-32" tabindex="-1"></a><span class="co">#&gt; --------------------------------------------------</span></span></code></pre></div>
710710
<p>The table of values shown in the print message for <code>poolObj</code> can also be extracted using the <code>as.data.frame()</code> function:</p>
711711
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" tabindex="-1"></a><span class="fu">as.data.frame</span>(poolObj)</span>
712712
<span id="cb10-2"><a href="#cb10-2" tabindex="-1"></a><span class="co">#&gt; parameter est se lci uci pval</span></span>
713713
<span id="cb10-3"><a href="#cb10-3" tabindex="-1"></a><span class="co">#&gt; 1 trt_4 -0.09180645 0.6826279 -1.43949684 1.2558839 8.931772e-01</span></span>
714714
<span id="cb10-4"><a href="#cb10-4" tabindex="-1"></a><span class="co">#&gt; 2 lsm_ref_4 -1.61581996 0.4862316 -2.57577141 -0.6558685 1.093708e-03</span></span>
715715
<span id="cb10-5"><a href="#cb10-5" tabindex="-1"></a><span class="co">#&gt; 3 lsm_alt_4 -1.70762640 0.4749573 -2.64531931 -0.7699335 4.262148e-04</span></span>
716-
<span id="cb10-6"><a href="#cb10-6" tabindex="-1"></a><span class="co">#&gt; 4 trt_5 1.32800107 0.9239991 -0.49687491 3.1528770 1.526144e-01</span></span>
717-
<span id="cb10-7"><a href="#cb10-7" tabindex="-1"></a><span class="co">#&gt; 5 lsm_ref_5 -4.14031255 0.6595847 -5.44302381 -2.8376013 3.163421e-09</span></span>
718-
<span id="cb10-8"><a href="#cb10-8" tabindex="-1"></a><span class="co">#&gt; 6 lsm_alt_5 -2.81231148 0.6459122 -4.08807336 -1.5365496 2.396574e-05</span></span>
719-
<span id="cb10-9"><a href="#cb10-9" tabindex="-1"></a><span class="co">#&gt; 7 trt_6 1.93891419 1.0001460 -0.03694571 3.9147741 5.438468e-02</span></span>
720-
<span id="cb10-10"><a href="#cb10-10" tabindex="-1"></a><span class="co">#&gt; 8 lsm_ref_6 -6.08530002 0.7176967 -7.50335519 -4.6672448 1.946811e-14</span></span>
721-
<span id="cb10-11"><a href="#cb10-11" tabindex="-1"></a><span class="co">#&gt; 9 lsm_alt_6 -4.14638583 0.6985434 -5.52650481 -2.7662668 1.911219e-08</span></span>
722-
<span id="cb10-12"><a href="#cb10-12" tabindex="-1"></a><span class="co">#&gt; 10 trt_7 2.13609482 1.1201125 -0.07781920 4.3500088 5.849971e-02</span></span>
723-
<span id="cb10-13"><a href="#cb10-13" tabindex="-1"></a><span class="co">#&gt; 11 lsm_ref_7 -6.98181990 0.8117268 -8.58678186 -5.3768579 1.511791e-14</span></span>
724-
<span id="cb10-14"><a href="#cb10-14" tabindex="-1"></a><span class="co">#&gt; 12 lsm_alt_7 -4.84572508 0.7885999 -6.40477980 -3.2866704 7.793320e-09</span></span></code></pre></div>
716+
<span id="cb10-6"><a href="#cb10-6" tabindex="-1"></a><span class="co">#&gt; 4 trt_5 1.33436741 0.9255820 -0.49370018 3.1624350 1.513737e-01</span></span>
717+
<span id="cb10-7"><a href="#cb10-7" tabindex="-1"></a><span class="co">#&gt; 5 lsm_ref_5 -4.15140080 0.6608110 -5.45658456 -2.8462170 3.110832e-09</span></span>
718+
<span id="cb10-8"><a href="#cb10-8" tabindex="-1"></a><span class="co">#&gt; 6 lsm_alt_5 -2.81703340 0.6478134 -4.09662455 -1.5374422 2.460646e-05</span></span>
719+
<span id="cb10-9"><a href="#cb10-9" tabindex="-1"></a><span class="co">#&gt; 7 trt_6 1.93372720 1.0000881 -0.04213496 3.9095894 5.502527e-02</span></span>
720+
<span id="cb10-10"><a href="#cb10-10" tabindex="-1"></a><span class="co">#&gt; 8 lsm_ref_6 -6.08849645 0.7148756 -7.50096014 -4.6760328 1.548722e-14</span></span>
721+
<span id="cb10-11"><a href="#cb10-11" tabindex="-1"></a><span class="co">#&gt; 9 lsm_alt_6 -4.15476925 0.6975559 -5.53298494 -2.7765536 1.739819e-08</span></span>
722+
<span id="cb10-12"><a href="#cb10-12" tabindex="-1"></a><span class="co">#&gt; 10 trt_7 2.17651184 1.1379189 -0.07335404 4.4263777 5.784145e-02</span></span>
723+
<span id="cb10-13"><a href="#cb10-13" tabindex="-1"></a><span class="co">#&gt; 11 lsm_ref_7 -7.00205125 0.8268086 -8.63751537 -5.3665871 4.132364e-14</span></span>
724+
<span id="cb10-14"><a href="#cb10-14" tabindex="-1"></a><span class="co">#&gt; 12 lsm_alt_7 -4.82553941 0.7830124 -6.37333317 -3.2777456 6.903910e-09</span></span></code></pre></div>
725725
<p>These outputs gives an estimated difference of
726-
2.136 (95% CI -0.078 to 4.350)
726+
2.177 (95% CI -0.073 to 4.426)
727727
between the two groups at the last visit with an associated p-value of 0.058.</p>
728728
</div>
729729
<div id="code" class="section level1" number="7">

0 commit comments

Comments
 (0)