guido-s / netmeta

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

pairwise does not pass model.glmm argument due to multiple actual arguments for method.tau #13

Closed verweijs closed 1 year ago

verweijs commented 1 year ago

I would like to perform a netmeta to calculate effect estimates of a rate outcome that follows a Poisson distribution.

For this NMA, I first create multiple pairwise meta-analyses on arm-level data in long format.

However, I would like pairwise to use the underlying metainc with a mixed-effects Poisson regression model with random study effects. In metainc I could just pass the arguments method="GLMM" and model.glmm = "UM.RS". However, pairwise does not seem to pass these arguments through to metainc.

It gives the error Error in metainc(...): formal argument Generalized linear mixed models only possible with argument 'method.tau="ML"'. Adding this tau argument results in a formal argument "method.tau" matched by multiple actual arguments, since it is hardcoded to be "DL" in line 1296 of pairwise.R.

guido-s commented 1 year ago

R function metainc is only used in pairwise to calculate treatment estimates and standard errors not pairwise meta-analysis results. This is basically the same functionality as provided in escalc in R package metafor.

For metainc, the same treatment estimates and standard errors are calculated for any value of argument method. This is different for metabin where method = "Peto" calculates Peto odds ratios.

verweijs commented 1 year ago

Dear @guido-s , thanks for the fast reply. How would one perform an NMA on a Poisson rate outcome using netmeta package in that case?

My understanding is that the netmeta() function uses the TE and seTE created by pairwise, because the DF created by pairwise is in contrast-based format

guido-s commented 1 year ago

TE contains the log incidence ratio rate or incidence rate difference and seTE its standard error which are used in netmeta(). Does this answer your question?

verweijs commented 1 year ago

Yes it does. Regarding my research: the frequentist approach probably does not provide an answer for my Poisson problem.

guido-s commented 1 year ago

I would look for a Bayesian NMA model for Poisson data.