[R-meta] Peters test in metafor
lists at dewey.myzen.co.uk
Sat Jul 15 15:24:42 CEST 2017
If you have very different sample sizes then you will presumably have
very different precisions as well so any sort of funnel plot/regression
test will suffer from having one group of studies well separated from
the other. In such circumstances I would be quite sceptical about any
attempt to look for small study effects.
On 15/07/2017 10:18, Phil Jones wrote:
> 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",
> 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
> 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.
>> -----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>
>>> 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
>>> to perform Peters and how do I know if the result is significant
>>> (presumably a p-value is returned)?
>>> res<-rma(yi=logrr,sei = sei,method="DL",data=data)
> [[alternative HTML version deleted]]
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis at r-project.org
> This email has been checked for viruses by AVG.
More information about the R-sig-meta-analysis