[R-meta] Peters test in metafor

Phil Jones philpauljones at gmail.com
Sat Jul 15 11:18:09 CEST 2017


Thank you both.

I hope that you do not mind follow-up questions so that I can implement
this correctly.

In regard to: with(data, regtest(logrr, sei=sei, ni=ni, model="lm",
predictor="ninv"))

1. Is it acceptable if studies are a mixture of case-control and cohort
studies? (I know it is acceptable for meta-analysis generally, but is it OK
for Peters given the fact sample size is used for weighting and there are
such large differences in sample sizes of case-control cf. cohort studies?)

2. By total sample size, what does this mean in the context of categorical
exposures? For example, for an RR of a disease for highest vs lowest tea
consumption, is the total sample size the number of participants in the
highest and lowest categories only (i.e. excluding participants in the
medium categories between highest and lowest)?

3. Is there any (simple) way to use person years where sample size is not
available?

Thank you so much

On Fri, Jul 14, 2017 at 6:06 PM, Viechtbauer Wolfgang (SP) <
wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:

> To clarify the last point - you have two options:
>
> 1) Fit the model with:
>
> res <- rma(logrr, sei=sei, ni=ni, method="DL", data=data)
>
> assuming that 'ni' is the name of the variable in 'data' that contains the
> total sample size of each study. Then you can do:
>
> regtest(res, model="lm", predictor="ninv")
>
> 2) Or just do:
>
> with(data, regtest(logrr, sei=sei, ni=ni, model="lm", predictor="ninv"))
>
> Both will give you the same result.
>
> Best,
> Wolfgang
>
> -----Original Message-----
> From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-
> bounces at r-project.org] On Behalf Of James Pustejovsky
> Sent: Friday, July 14, 2017 18:52
> To: Phil Jones
> Cc: r-sig-meta-analysis at r-project.org
> Subject: Re: [R-meta] Peters test in metafor
>
> Use regtest() with model = "lm" and predictor = "ninv." Note that you'll
> need to provide the total sample sizes too.
>
> On Fri, Jul 14, 2017 at 9:26 AM, Phil Jones <philpauljones at gmail.com>
> wrote:
>
> > I would like to use Peters test to assess publication bias in a
> > meta-analysis. My code for the main analysis is below. What syntax do I
> use
> > to perform Peters and how do I know if the result is significant
> > (presumably a p-value is returned)?
> >
> > Thanks
> >
> > res<-rma(yi=logrr,sei = sei,method="DL",data=data)
>

	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list