-----Original Message-----
From: James Pustejovsky <jepusto at gmail.com>
Sent: Friday, August 16, 2024 04:35
To: Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer at maastrichtuniversity.nl>
Cc: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-
project.org>
Subject: Re: [R-meta] selection models in metafor with step truncation
Hi Wolfgang,
Thanks for clarifying. I asked mainly because I'm (slowly) writing up notes on a
bunch of selection models (links below) and wanted to make sure that I'm giving
accurate descriptions of the metafor implementations. I don't have any solid
intuition about which of the possibilities would be better--I would guess
that any difference in fit might be pretty minor, but really not sure at all.
James
Notes on step function model: https://jepusto.com/posts/step-function-selection-
models/
Notes on Copas model: https://jepusto.com/posts/Copas-selection-models/
On Tue, Aug 13, 2024 at 5:39?AM Viechtbauer, Wolfgang (NP)
<mailto:wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Hi James,
Catching up on posts here. See:
https://github.com/wviechtb/metafor/blob/master/R/selmodel.rma.uni.r#L457
Assuming preci=1 and using your notation, this is:
ifelse(p_i < a, 1, w(p_i) / w(a))
which I think (first day back in the office - brain is still in warm-up mode) is
equivalent to min(1, w(p_i) / w(a)).
I didn't consider the other possibility. Interesting idea -- I just tried this
out and it does indeed give different results for some of the datasets that I
used.
Do you think one of these two options makes more sense?
Happy to add this alternative version if you would like to see this in
selmodel().
Best,
Wolfgang
-----Original Message-----
From: R-sig-meta-analysis <mailto:r-sig-meta-analysis-bounces at r-project.org>
Of James Pustejovsky via R-sig-meta-analysis
Sent: Saturday, August 3, 2024 04:39
To: R meta <mailto:r-sig-meta-analysis at r-project.org>
Cc: James Pustejovsky <mailto:jepusto at gmail.com>
Subject: [R-meta] selection models in metafor with step truncation
Hi Wolfgang,
I see in the metafor documentation for selmodel (
https://wviechtb.github.io/metafor/reference/selmodel.html#half-normal-
exponential-logistic-and-power-selection-models)
that the half-normal, negative exponential, logistic, and power curve
selection models can take a value for the step argument, as in the
following code:
library(metafor)
dat <- dat.hahn2001
res <- rma(yi, vi, data=dat, method="REML")
selmodel(res, type="halfnorm", alternative="less")
selmodel(res, type="halfnorm", alternative="less", step = .025)
From the description in the documentation, I wasn't sure how the step
truncation is implemented. Say that the step threshold is called a, the
p-value from study i is p_i, and the selection parameter is delta. Say that
the non-truncated weight function is w(p_i). For a > 0, is the weight
function
min(1, w(p_i) / w(a))
which you might call a "vertical" re-scaling? Or is it
ifelse(p_i < a, 1, w((p_i - a) / (1 - a)))
which you might call a "horizontal" re-scaling?
I think for at least some of the selmodel types listed, the vertical and
horizontal rescalings give different shapes. Could you clarify?
Best,
James