[R-meta] Fwd:
Michael Dewey
||@t@ @end|ng |rom dewey@myzen@co@uk
Tue Sep 28 14:47:06 CEST 2021
Dear Imran
The code which you present does not seem to correspond to the problem
you state you are having. I think you would be best to find a colleague
who can help you with basic R. I have put some comments in below to
start you off.
On 28/09/2021 11:20, Awais Wahab wrote:
> Hello!
> I need some help please.
> I have 5-6 one sided P-values from different studies and need to do their
> meta-analysis.
>
> I am using these (Example) codes in R as below, but they are not working,
>
> *> library(metap)*
>
> *pvals <- c(0.1, 0.1, 0.9, 0.9, 0.9, 0.9) *
>
OK so you have loaded the package and set up a vector pvals with your
p-values.
> *> istwo <- c(TRUE, FALSE, TRUE, FALSE, TRUE, FALSE)*
>
> *> toinvert <- c(FALSE, TRUE, FALSE, FALSE, TRUE, TRUE)*
>
> *> two2one(pvals, two = istwo, invert = toinvert)*
>
In the text you said they were all one-sided so why are you using the
two2one function to convert some of them from two-sided to one-sided?
> *> print(validity)*
>
> *> plotp(validity)*
>
> *> schweder(validity)*
>
The validity dataset is provided with the package to use in examples. It
has nothing to do with your problem at all.
>
> *OR this below,*
>
>
>
> *Fisher's method, T = -2*log(p-value1)-2*log(p-value2)-...-2*log(p-valuem)
> where m is the number of p-values. Under the null hypothesis, this will be
> distributed as chi-squared with m degrees of freedom, so you would then do
> T.pval = 1-pchisq(T,m)*
>
>
why not do
result <- sumlog(pvals)
at this point and then print result?
Just for the record Fisher's method may not be the most suitable one for
your scientific question but now you can replace sumlog with one of the
other functions.
> Are these codes correct ? I am not sure where exactly to put my p-values.
> It will be great if someone can help me with the correct codes.
>
>
> I will be much grateful for your kind support.
>
> best regards.
>
> On Tue, Sep 28, 2021 at 11:27 AM Dr. Gerta Rücker <
> ruecker using imbi.uni-freiburg.de> wrote:
>
>> Hi Imran,
>>
>> There was already an answer by Michael Dewey with a useful link to
>> MetaAnalysis Task View https://cran.r-project.org/view=MetaAnalysis
>>
>> Best,
>>
>> Gerta
>>
>> Am 28.09.2021 um 10:06 schrieb Awais Wahab:
>>> Hello!
>>>
>>> Is it possible to perform meta-analysis with available P-values in each
>>> study as effect size, instead of HR, OR etc. ?
>>>
>>> Thanks in advance.
>>> Best regards,
>>> Imran
>>>
>>> [[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
>>
>> --
>>
>> Dr. rer. nat. Gerta Rücker, Dipl.-Math.
>>
>> Guest Scientist
>> Institute of Medical Biometry and Statistics,
>> Faculty of Medicine and Medical Center - University of Freiburg
>>
>> Zinkmattenstr. 6a, D-79108 Freiburg, Germany
>>
>> Mail: ruecker using imbi.uni-freiburg.de
>> Homepage:
>> https://www.uniklinik-freiburg.de/imbi-en/employees.html?imbiuser=ruecker
>>
>>
>
> [[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
>
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the R-sig-meta-analysis
mailing list