# [R-meta] vi versus sei in rma() give different results

P. Roberto Bakker robertobakker at gmail.com
Wed Oct 18 23:12:48 CEST 2017

```It worked! Thanks a lot.
Roberto

2017-10-18 22:54 GMT+02:00 A C Del Re <acdelre at gmail.com>:

> You just need to specify in the arguments whether it's sei or vi, eg,
>
> # vi
> res <- rma(measure="SMD", yi, vi=vi, data=re, method="FE", digits=2)
>
> #sei
> res <- rma(measure="SMD", yi, sei=sei, data=re, method="FE", digits=2)
>
>
> On Wed, Oct 18, 2017 at 1:44 PM, P. Roberto Bakker <
> robertobakker at gmail.com> wrote:
>
>> Hi,
>>
>> I understood from the metafor documentation you can either use vi
>> (variance) or sei (standard error (=sqrt of variance) in rma()..
>> However, with vi and I get other results than with sei. I would expect the
>> same results should be the same.
>> Can somebody help me understand this, or am I doing something wrong?
>>
>> Roberto
>> PS in the meta-analysis literature I read that se = sqrt of variance. But
>> I
>> learned from statistics that SD = sqrt of variance. Can somebody explain
>> me
>> this?
>>
>>
>> > re
>> # A tibble: 10 × 6
>>             yi       sei         vi `inverse varience` `weighed hedge`
>>   X__1
>>          <dbl>     <dbl>      <dbl>              <dbl>           <dbl>
>>  <dbl>
>> 1   1.91498797 0.4231468 0.17905321           5.584932      10.6950776
>> 1.91498797
>> 2  -0.25848358 0.2615776 0.06842283          14.615005      -3.7777390
>> -0.25848358
>> 3   0.06543005 0.3204569 0.10269263           9.737797       0.6371445
>> 0.06543005
>> 4   0.77363080 0.3290877 0.10829873           9.233718       7.1434890
>> 0.77363080
>> 5  -0.79554100 0.3341517 0.11165733           8.955973      -7.1248437
>> -0.79554100
>> 6   0.29374938 0.2387312 0.05699258          17.546145       5.1541691
>> 0.29374938
>> 7   0.94409401 0.2527629 0.06388910          15.652122      14.7770750
>> 0.94409401
>> 8  -0.56731857 0.2423818 0.05874893          17.021588      -9.6566629
>> -0.56731857
>> 9   0.18910949 0.1766278 0.03119739          32.053967       6.0617093
>> 0.18910949
>> 10  0.38103574 0.1713235 0.02935176          34.069510      12.9817010
>> 0.38103574
>> >
>>
>> WITH SEI
>> *> reis <- rma(measure="SMD", yi, sei, data=re, method="FE", digits=2)*
>> *> reis*
>>
>> *Fixed-Effects Model (k = 10)*
>>
>> *Test for Heterogeneity: *
>> *Q(df = 9) = 16.54, p-val = 0.06*
>>
>> *Model Results:*
>>
>> *estimate    se  zval  pval  ci.lb <http://ci.lb>  ci.ub   *
>> *    0.25  0.16  1.54  0.12  -0.07   0.56   *
>>
>> *---*
>> *Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 *
>>
>>
>> *WITH VI*
>>
>>
>>
>>
>>
>> *> res <- rma(measure="SMD", yi, vi, data=re, method="FE", digits=2)>
>> resFixed-Effects Model (k = 10)Test for Heterogeneity: Q(df = 9) = 51.46,
>> p-val < .01Model Results:estimate    se  zval  pval  ci.lb <http://ci.lb>
>> ci.ub        0.22  0.08  2.88  <.01   0.07   0.38  **---Signif. codes:  0
>> ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 *
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-meta-analysis mailing list
>> R-sig-meta-analysis at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>
>
>
>
> --
> AC Del Re, PhD
> acdelre.weebly.com
>

[[alternative HTML version deleted]]

```