## Package News

### 2024-03-28: Version 4.6-0 Released on CRAN

A new version of the metafor package has been released on CRAN. This update occurred a bit sooner than originally planned, but there were two minor issues that flagged metafor as requiring an update as otherwise it would have been archived on CRAN, which would have led to some unpleasant consequences for other packages that depend on metafor. So an update needed to be pushed out relatively quickly.

The issues themselves were easy to fix. The first was a very minor formatting oversight in one of the help files. The second issue was the result of two packages being archived that metafor had listed as suggested packages, namely Rcgmin and Rvmmin. These packages provided some alternative optimizers that could be chosen for fitting certain models, but were not essential dependencies for the metafor package and hence could be easily removed. Actually, these optimizers have been moved to the optimx package and will probably be reincorporated into metafor later on.

The update itself took a bit longer (prompting a few well-deserved reminders from the CRAN team) due to other work-related responsibilities, plus I wanted to finish a few other updates to the package I was working on in the meantime. The full changelog can be found here but I would like to highlight a few items.

First of all, I have finally added effect sizes measures for computing the standardized mean change using raw score standardization with pooled standard deviations to the `escalc()`

function. Traditionally, following Becker's 1988 seminal paper (link), this measure was computed with $$d = \frac{\bar{x}_1 - \bar{x}_2}{s_1},$$ where $\bar{x}_1$ and $\bar{x}_2$ are the means at the two measurement occasions and $s_1$ is the standard deviation of the raw scores observed at the first measurement occasion (followed by a slight bias correction applied to $d$). In principle, one can also use $s_2$ in the denominator, but crucially, only one of two standard deviations is used for the standardization. While there is nothing inherently wrong with doing so (and it simplifies the derivation of the exact distribution of $d$), some would prefer to pool the two standard deviations and hence use $$d = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2 + s_2^2}{2}}}$$ as the effect size measure (i.e., we average the variances and then take the square-root thereof). This is now possible with `measure="SMCRP"`

under the assumption that the true variances are the same at the two measurement occasions and as `measure="SMCRPH"`

without this assumption, that is allowing for heteroscedasticity of the two variances (in the latter case, the computation of the sampling variance needs to be adjusted slightly). See the documentation of the escalc function for further details.

Second, the `selmodel()`

function has received a few updates. To start, the function no longer stops with an error when one or more intervals defined by the `steps`

argument do not contain any observed p-values (instead a warning is issued and model fitting proceeds, but may fail). For automating analyses and simulation studies, one can now set `ptable=TRUE`

in which case the function will simply return the table with the number of p-values falling into the various intervals, based on which one can decide how to proceed.

Furthermore, by setting argument `decreasing=TRUE`

, it is now possible to fit the step function model under the assumption that the selection function parameters are a monotonically decreasing function of the p-values. This feature is somewhat experimental – it requires using optimization with inequality constraints or a clever reformulation of the objective function that enforces such a constraint, which complicates some internal issues and makes model fitting more difficult. One can also debate whether one should ever make this assumption in the first place, but it is a feature I wanted to implement for testing and research purposes anyway.

Finally, per request, it is now also possible to pass the observed p-values of the studies to the function directly via the `pval`

argument. This can in principle be of interest when the observed p-values were not computed with a standard Wald-type test (as assumed by the function) but based on a different method. This is an undocumented and experimental feature, because doing so creates a bit of a mismatch between the assumptions internal to the function (since the integration step to compute the weighted density of the effect size estimates still assumes the use of a standard Wald-type test). To what extent this is actually a problem and whether this feature can improve the accuracy of the results from selection models remains to be determined in future research.