guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
82 stars 32 forks source link

zero p value in forest plot #10

Closed vashetye closed 8 months ago

vashetye commented 5 years ago

Hi,

I am getting a zero p value for test for effect in subgroups, actually it should print P<0.01. I am not sure if there is a problem with data, but it prints P<0.01 for other outcomes. Is it for very high values of Z it gives 0 ? I am using metabin object. Here is my code:

md <- metabin(Events1,Total1,Events2,Total2, data = df1,studlab = Study,sm="RD", byvar = factor(Subgroup),print.byvar = FALSE,comb.fixed = FALSE,keepdata = TRUE) forest(md,test.effect.subgroup = TRUE,layout = "Revman5")

Kindly share your suggestions.

guido-s commented 5 years ago

R function pnorm() used internally in all meta-analysis functions of meta returns a value of 0 for Z values above 37.5 - see pnorm(37.5, lower = FALSE) and pnorm(37.6, lower = FALSE).

Accordingly, P values are printed as zero in printouts and the forest plot - using the internal function formatPT() in meta: meta:::formatPT(pnorm(37.5, lower = FALSE)) and meta:::formatPT(pnorm(37.6, lower = FALSE)).

vashetye commented 5 years ago

Thank you Prof. Schwarzer.

Afreen89 commented 8 months ago

Hi. I am getting the similar issue however my call is different. I am using metagen() object with z-scores of same SNPs from two different studies using the common effects model.

meta_result <- metagen(
  TE = TE,
  seTE = seTE,
  studlab = studlab,
  method.tau = "REML",   # Specify method for estimating heterogeneity
  common = TRUE,
  random = FALSE,
  data = current_data_chunk_updated
)

Here TE is the Z-scores of two SNPs, seTE is 1/ sqrt(n) for each study, I am getting the same seTE.common and pval.common for each SNP, however the TE.common is different for each SNP, which is what we expect.

Could you help me with this?

guido-s commented 8 months ago

I am not sure how I could help you without more information. As I wrote above, if the Z score is above 37.5, the p-value is exactly zero.

Afreen89 commented 8 months ago

Can we do meta-analysis in meta package using metagen if we have z-score and sample sizes only? I do not have beta and standard error values.

guido-s commented 8 months ago

AFAIK, this is not possible, but I am no expert on this. I would suggest that you ask this question on R-sig-meta.