When I run my function call robu()
using dat1
data.frame, the function runs perfectly fine. However, when I extract EXACTLY the same data from a larger data.frame and call it dat2
the same robu()
call fails!
Am I missing anything here? (fully reproducible code appears below)
library(robumeta)
dat1 <- data.frame(study.name = c("Guo", "Guo", "Guo"),
dint = c(0.8525524, 0.6801170, 0.7709437),
SD = c(0.3127318, 0.2994228, 0.3075567))
robu(dint~1, data = dat1, var = SD^2, study = study.name) ## Runs perfectly fine!!!!
d1 <- read.csv("https://raw.githubusercontent.com/rnorouzian/m/master/v7.csv", h = T)
dat2 <- d1[100:102,1:3] ### Exactly same data as `dat1`
robu(dint~1, data = dat2, var = SD^2, study = study.name) ## NOW FAILS ! `infinite or missing values in 'x'`