About metagen for meta-analysis: error in eval(matchcall[[match(argname, names(matchcall))]], data, enclos = encl) : invalid 'envir' argument of type 'closure'

I am doing a meta-analysis
This is the data
|Study|Year|OR|LCI|UCI|
|Behrens|2021a|0.56|0.1|3.01|
|Behrens|2021b|0.97|0.32|2.93|
|Cheng|2021a|0.98|0.68|1.41|
My code is
library(meta)
shapiro.test(Metabook$OR)
lnor <- log (Metabook[,'OR'])
lnuci <- log (Metabook[,'UCI'])
lnlci <- log (Metabook[,'LCI'])
selnor <- (lnuci-lnlci)/(2*1.96)
MetaOR = metagen (lnor,
selnor,
sm ='OR',
data = data,
studlab = paste(data$Study, data$Year, sep = '-'),
backtransf = T
)
The program keeps sending me: Error in eval(matchcall[[match(argname, names(matchcall))]], data, enclos = encl) : invalid 'envir' argument of type 'closure'
I really do not know the reason.

Thank you if anyone can help me.

What data do you refer to here ?
If you didnt define a 'data' then it would mean the data() function, which would be inappropriate.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.