Skip to content

Commit

Permalink
Update to mice 3.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanbuuren committed Nov 22, 2024
1 parent 79ad589 commit 537148e
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 611 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mice
Type: Package
Version: 3.16.17
Version: 3.17.0
Title: Multivariate Imputation by Chained Equations
Date: 2024-11-22
Authors@R: c(person("Stef", "van Buuren", role = c("aut","cre"),
Expand Down
114 changes: 30 additions & 84 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,4 @@
# mice 3.16.17

* Create version to perform reverse dependency checks

# mice 3.16.16

* Prevent `as.mids()` from filling the `imp` object for complete variables

# mice 3.16.15

* Initialize single-variables blocks in `make.method()` in a more efficient way (resolves #672)

# mice 3.16.14

* Fixes a bug during initialization of factor values

# mice 3.16.13

* Adds support for the `literanger` package for `rf` imputation that is about twice as fast as `ranger` (#648). Thanks @stephematician for the contribution.

# mice 3.16.12

* Fixes an installation problem when `Rprofile` prints to `stdout` on Fedora, R version 4.1.3 (#646, #647). Thanks @brookslogan for the fix.

# mice 3.16.11

* Repairs lost braces in the documentation

# mice 3.16.10

* Adds support for non-syntactic variables names with backticks (#631)

# mice 3.16.9

* Fixes a problem with the `minpuc` argument in `quickpred()` (#634)
* Fixes `coef() not available on S4 object` when using with `lavaan` (#615, #616)
* Adds `.github/dependabot.yml` configuration to automate daily check (#598)
* Update documentation tags to `roxygen2 7.3.1` requirements

# mice 3.16.8

* Fixes problems with zero predictors (#588)

# mice 3.16.7

### Minor changes

* Solves problem with the package documentation link
* Simplifies `NEWS.md` formatting to get correct version sequence on CRAN and in-package NEWS

# mice 3.16.6

### Minor changes

* Prepares for the deprecation of the `blocks` argument at various places
* Removes the need for `blocks` in `initialize_chain()`
* In `rbind()`, when formulas are concatenated and duplicate names are found, also rename the duplicated variables in formulas by their new name

### Bug fixes

* Fixes a bug in `filter.mids()` that incorrectly removed empty components in the `imp` object
* Fixes a bug in `ibind()` that incorrectly used `length(blocks)` as the first dimension of the `chainMean` and `chainVar` objects
* Corrects the description `visitSequence`, `chainMean` and `chainVar` components of the `mids` object

# mice 3.16.5

### Bug fixes

* Patches a bug in `complete()` that auto-repeated imputed values into cells that should NOT be imputed (occurred as a special case of `rbind()`, where the first set of rows was imputed and the second was not).
* Replaces the internal variable `type` by the more informative `pred` (currently active row of `predictorMatrix`)

# mice 3.16.4
# mice 3.17.0

### Major changes

Expand All @@ -85,27 +14,42 @@

* Note that we still lack solid evidence for these claims. (#576). Contributed @stefvanbuuren

# mice 3.16.3

### Major changes

* **New system-independent method for pooling**: This version introduces a new function `pool.table()` that takes a tidy table of parameter estimates stemming from `m` repeated analyses. The input data must consist of three columns (parameter name, estimate, standard error) and a specification of the degrees of freedom of the model fitted to the complete data. The `pool.table()` function outputs 14 pooled statistics in a tidy form. The primary use of `pool.table()` is to support parameter pooling for techiques that have no `tidy()` or `glance()` methods, either within `R` or outside `R`. The `pool.table()` function also allows for a novel workflows that 1) break apart the traditional `pool()` function into a data-wrangling part and a parameters-reducing part, and 2) does not necessarily depend on classed R objects. (#574). Contributed @stefvanbuuren

### Bug fixes
* **literanger**: Adds support for the `literanger` package for `rf` imputation that is about twice as fast as `ranger` (#648). Thanks @stephematician for the contribution.

* Fixes the "large logo" problem. (#574). Contributed @hanneoberman
### Breaking changes

# mice 3.16.2
* The `complete(..., action = "long", ...)` command puts the columns named `".imp"` and `".id"` in the last two positions of the long data (instead of first two positions). In this way, the columns of the imputed data will have the same positions as in the original data, which is more user-friendly and easier to work with. Note that any existing code that assumes that variables `".imp"` and `".id"` are in columns 1 and 2 will need to be modified. The advice is to modify the code using the variable names `".imp"` and `".id"`. If you want the old behaviour, specify the argument `order = "first"`. (#569). Contributed @stefvanbuuren

### Major changes
### Minor changes

* **Breaking change:** The `complete(..., action = "long", ...)` command puts the columns named `".imp"` and `".id"` in the last two positions of the long data (instead of first two positions). In this way, the columns of the imputed data will have the same positions as in the original data, which is more user-friendly and easier to work with. Note that any existing code that assumes that variables `".imp"` and `".id"` are in columns 1 and 2 will need to be modified. The advice is to modify the code using the variable names `".imp"` and `".id"`. If you want the old behaviour, specify the argument `order = "first"`. (#569). Contributed @stefvanbuuren
* Adds support for the `dots` argument to `ranger::ranger(...)` in `mice.impute.rf()` (#563). Contributed @edbonneville
* Prepares for the deprecation of the `blocks` argument at various places
* Removes the need for `blocks` in `initialize_chain()`
* In `rbind()`, when formulas are concatenated and duplicate names are found, also rename the duplicated variables in formulas by their new name
* Solves problem with the package documentation link
* Simplifies `NEWS.md` formatting to get correct version sequence on CRAN and in-package NEWS
* Initialize single-variables blocks in `make.method()` in a more efficient way (resolves #672)
* Prevent `as.mids()` from filling the `imp` object for complete variables

# mice 3.16.1
### Bug fixes

### Minor changes
* Fixes the "large logo" problem. (#574). Contributed @hanneoberman
* Patches a bug in `complete()` that auto-repeated imputed values into cells that should NOT be imputed (occurred as a special case of `rbind()`, where the first set of rows was imputed and the second was not).
* Replaces the internal variable `type` by the more informative `pred` (currently active row of `predictorMatrix`)
* Fixes a bug in `filter.mids()` that incorrectly removed empty components in the `imp` object
* Fixes a bug in `ibind()` that incorrectly used `length(blocks)` as the first dimension of the `chainMean` and `chainVar` objects
* Corrects the description `visitSequence`, `chainMean` and `chainVar` components of the `mids` object
* Fixes problems with zero predictors (#588)
* Fixes a problem with the `minpuc` argument in `quickpred()` (#634)
* Fixes `coef() not available on S4 object` when using with `lavaan` (#615, #616)
* Adds `.github/dependabot.yml` configuration to automate daily check (#598)
* Update documentation tags to `roxygen2 7.3.1` requirements
* Repairs lost braces in the documentation
* Fixes an installation problem when `Rprofile` prints to `stdout` on Fedora, R version 4.1.3 (#646, #647). Thanks @brookslogan for the fix.
* Fixes a bug during initialization of factor values

* Adds support for the `dots` argument to `ranger::ranger(...)` in `mice.impute.rf()` (#563). Contributed @edbonneville

# mice 3.16.0

Expand All @@ -123,6 +67,8 @@
* Updates GitHub actions for package checking and site building
* Preserves user settings in `predictorMatrix` for case F by adding a `predictorMatrix` argument to `make.predictorMatrix()`
* Polishes `mice.impute.mpmm()` example code
* Adds support for non-syntactic variables names with backticks (#631)


### Bug fixes

Expand Down
155 changes: 36 additions & 119 deletions cran-comments.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ output: github_document
knitr::opts_chunk$set(echo = TRUE)
```

## mice 3.16.0
## mice 3.17.0

## Overview

This submission
This submission of `mice` adds new features, bug fixes, and documentation improvements.
See <https://github.com/amices/mice/blob/master/NEWS.md>

- is a third resubmission, using `devtools::check(env_vars = c('_R_CHECK_DEPENDS_ONLY_' = "true"))` to mimmick CRAN incoming checks
- is a second resubmission, with `\donttest` changed in `\dontrun` to evade `_R_CHECK_DEPENDS_ONLY_=true` errors;
- is a resubmission of `mice 3.16.0` after the orphaned `ucminf` CRAN package got a new maintainer;
- is tested with the `_R_CHECK_DEPENDS_ONLY_=true` flag, as requested;
- solves the problems at `https://cran.r-project.org/web/checks/check_results_mice.html`;
- contains new features and bug fixes, as described in the `NEWS.md`.
The package has been tested on the CRAN incoming checks and on the `win-builder` and `rhub` platforms. The package has 132 downstream dependencies. I found one issue for which I contacted the maintainer of the `autoreg` package.

## Test environments

```{r}
R.Version()
R.Version()$version.string
```

## Checks
Expand All @@ -40,81 +36,12 @@ Status: OK
### Rhub

```{r eval=FALSE}
devtools::check_rhub()
rhub::rhub_doctor()
rhub::rhub_check()
```

#### Windows
Status: OK <https://github.com/amices/mice/actions/runs/11974214695>

```
── mice 3.16.0: NOTE
Build ID: mice_3.16.0.tar.gz-018f40fa4cdc492d8c9f43b7e5f5e0e7
Platform: Windows Server 2022, R-devel, 64 bit
Submitted: 11m 27s ago
Build time: 11m 25s
❯ checking HTML version of manual ... [27s] NOTE
Skipping checking math rendering: package 'V8' unavailable
❯ checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
''NULL''
❯ checking for detritus in the temp directory ... NOTE
Found the following files/directories:
'lastMiKTeXException'
0 errors ✔ | 0 warnings ✔ | 3 notes ✖
```

I believe these NOTES are benign.

#### Fedora Linux

```
Status: succes
```

#### Ubuntu 20.04

```
Status: succes
```

#### Debian

```
FAILURE
Running `R CMD build`...
* checking for file ‘/tmp/Rtmp5Lhzhn/remotes13171d81356/mice/DESCRIPTION’ ... OK
* preparing ‘mice’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘mice_3.16.0.tar.gz’
Installing package into ‘/home/docker/R’
(as ‘lib’ is unspecified)
Error : Bioconductor does not yet build and check packages for R version 4.4; see
https://bioconductor.org/install
ERROR: dependency ‘mitml’ is not available for package ‘mice’
* removing ‘/home/docker/R/mice’
> There were 20 warnings (use warnings() to see them)
>
Error : Bioconductor does not yet build and check packages for R version 4.4; see
https://bioconductor.org/install
> library(mice)
Error in library(mice) : there is no package called ‘mice’
Execution halted
Build step 'Execute shell' marked build as failure
Pinging https://builder.r-hub.io/build/FAILURE/mice_3.16.0.tar.gz-82dc7cda08814b25ac48be4b5c9c940b/2023-06-01T11:37:52Z
{"status":"ok"}
Finished: FAILURE
```

I believe I cannot do something to make this problem disappear.

### Local checks

Expand All @@ -126,7 +53,7 @@ build()
```

```{bash eval=FALSE}
R CMD CHECK mice_3.16.0.tar.gz
R CMD CHECK mice_3.17.0.tar.gz
Status: OK
```
Expand All @@ -137,7 +64,7 @@ Status: OK
NOTE: Run in OSX terminal, not in Rstudio terminal.

```{bash eval=FALSE}
env _R_CHECK_DEPENDS_ONLY_=true R CMD check mice_3.16.0.tar.gz
env _R_CHECK_DEPENDS_ONLY_=true R CMD check mice_3.17.0.tar.gz
Status: OK
```
Expand All @@ -147,20 +74,23 @@ Status: OK
devtools::check(env_vars = c('_R_CHECK_DEPENDS_ONLY_' = "true"))
...
Status: OK
── R CMD check results ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── mice 3.16.0 ────
Duration: 1m 13s
Status: 1 NOTE
── R CMD check results ─────────────────────────────────────────────────────────────────────── mice 3.17.0 ────
Duration: 1m 10.9s
❯ checking for future file timestamps ... NOTE
unable to verify current time
0 errors ✔ | 0 warnings ✔ | 0 notes ✔
0 errors ✔ | 0 warnings ✔ | 1 note ✖
```


## Downstream dependencies

### Overview

`mice` has 114 downstream dependencies
`mice` has 132 downstream dependencies

```{r eval=FALSE}
# NOTE: Temporarily remove credentials line from .Rprofile
Expand All @@ -173,38 +103,25 @@ revdep_check(pkg = ".", num_workers = 10, quiet = FALSE)
revdepcheck::revdep_summary()
```

### New issues

#### `MatchThem`

There is one new warning, for the `MatchThem` package:

```{r}
revdepcheck::revdep_details(revdep = "MatchThem")
```

- I alerted the maintainer of the `MatchThem` package that the
documentation for `cbind.mids()` was removed from the `mice` package
to conform to CRAN guidelines. The maintainer responded this will be fixed
in the next release.

#### `bipd`
# Revdeps

```{r}
revdepcheck::revdep_details(revdep = "bipd")
```
## Failed to check (5)

- The novel NOTE for `bipd` is equivalent to the old one. I contacted the maintainer previously. Did not repeat it now.
|package |version |error |warning |note | |
|:-----------|:----------|:-----|:-------|:----| ------------------ |
|brms |2.22.0 |1 | |2 | Unrelated to mice |
|dynr |0.1.16-105 |1 | | | Unrelated to mice |
|pguIMP |0.0.0.3 |1 | | | Unrelated to mice |
|Replication |0.1.2 |1 | | | Unrelated to mice |
|rmsb |1.1-1 |1 | |1 | Unrelated to mice |

#### `pre`

- There is a new error generated by `test_pre_misc.R` of the `pre` package (`mice` is on `pre` Suggests):

```{r}
revdepcheck::revdep_details(revdep = "pre")
```
## New problems (4)

- I tried reproducing the error but stopped my attempt due to the complex structure
of the testing script. I contacted the `pre` maintainer by means of
issue <https://github.com/marjoleinF/pre/issues/30>.
|package |version |error |warning |note | |
|:--------|:-------|:------|:-------|:---------|:------------------|
|[autoReg](problems.md#autoreg)|0.3.3 |__+2__ | | | Informed the maintainer, asked for repair |
|[bipd](problems.md#bipd)|0.3 |1 | |-1 __+1__ | Does not run because of different CPU's |
|[finalfit](problems.md#finalfit)|1.0.8 |__+2__ | |1 | Same error as autoreg, possibly related |
|[pre](problems.md#pre)|1.0.7 |__+1__ | | | Unrelated to mice |

See <https://github.com/amices/mice/tree/master/revdep> for details.
Loading

0 comments on commit 537148e

Please sign in to comment.