[R-meta] specified weights in rma

Antonia Sudkaemper @@@udk@emper @ending from gm@il@com
Mon Aug 6 11:58:00 CEST 2018


Hello James,

thank you very much for your reply, that was very useful - I hadn't
realised the numbers were re-scaled versions of the ones I had specified!

If I understand this correctly then, the re-scaling does not effect my
results, i.e. mean, confidence intervals, p-value?

Thank you very much.

All the best, Antonia

On 3 August 2018 at 14:55, James Pustejovsky <jepusto using gmail.com> wrote:

> Antonia,
>
> The code looks correct to me, and it looks like it is producing the
> weighted average just as you specified:
>
>     mean_effect <- weighted.mean(effect, w = weight)
>     all.equal(mean_effect, as.numeric(meta$b), check.attributes = FALSE)
>
> Also, note that the output of weights() is re-scaled to sum to 100, which
> is why it does not agree with the inputted weights:
>
>     (rma_wt <- weights(meta))
>     sum(rma_wt)
>     100 * weight / sum(weight)
>     all.equal(rma_wt, 100 * weight / sum(weight), check.attributes = FALSE)
>
> Cheers,
> James
>
>
>
> On Fri, Aug 3, 2018 at 7:10 AM Antonia Sudkaemper <a.sudkaemper using gmail.com>
> wrote:
>
>> Hello all,
>>
>> I am trying to run a meta-analysis with specified weights, but even though
>> the code seems right the analysis seems to apply the default weights
>> rather
>> than the ones I specify - is there something wrong with the code?
>>
>> effect = c(2.46, 3.11, 3.93)
>> error = c(0.44, 0.38, 0.57)
>> weight = c(5.16, 6.70, 3.05)
>> study<-c("Study1", "Study2", "Study3")
>>
>> summary(meta <- rma(yi=effect, sei=error, weights=weight, slab=study))
>> weights(meta)
>>
>>
>> Thank you very much for your help.
>>
>> All the best, Antonia
>>
>> --
>> Antonia Sudkämper
>> PhD Candidate in Organizational Psychology/University of Exeter
>> www.antoniasudkaemper.com
>> a.sudkaemper using gmail.com
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-meta-analysis mailing list
>> R-sig-meta-analysis using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>>
>


-- 
Antonia Sudkämper
PhD Candidate in Organizational Psychology/University of Exeter
www.antoniasudkaemper.com
a.sudkaemper using gmail.com

	[[alternative HTML version deleted]]



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