Harbord test in metafor package in R I'm hoping to implement Harbord's method (https://onlinelibrary.wiley.com/doi/abs/10.1002/sim.2380) for evaluating publication bias using the 'metafor' package in R. It appears this is possible (https://wviechtb.github.io/metafor/reference/regtest.html) but I am unsure how this method in particular can be specified. Any suggestions are much appreciated!

You just need to use Peto's log odds ratios as the outcome measure for your meta-analysis. So, for example:
library(metafor)

dat <- dat.egger2001

# meta-analysis of all trials except ISIS-4 using Peto's method
res <- rma.peto(ai=ai, n1i=n1i, ci=ci, n2i=n2i, data=dat, subset=-16)
regtest(res)

# or equivalently
dat <- escalc(measure="PETO", ai=ai, n1i=n1i, ci=ci, n2i=n2i, data=dat, subset=-16)
res <- rma(yi, vi, data=dat, method="FE")
regtest(res)

