When I try to perform a meta-analysis with hierarchical weights in robumeta I get
Error in eigen(x) : infinite or missing values in 'x',
using the same data that does not produce any errors with correlational weights. My data matrix does not have any NA or missing values. Cluster entails whole numbers between 1 and 4.
Does anyone know why I get the Eigen(x) error? Code needed to reproduce error:
#load data, you need to adjust read.table depending on where the file is saved.
mydata <- read.table ("H:/Desktop/Max_R_Dataset_Meta_Analysis.csv", header = TRUE, sep = ",")
#install & load packages
library (robumeta)
library (devtools)
install_github("jepusto/clubSandwich")
library (clubSandwich)
#fit moderator model with CORR
res_2 <- robu (formula = effect_size ~ pathway, var.eff.size = effect_size_variance, studynum = Study_ID, modelweights = "CORR", rho = 0.8, small = TRUE, data = mydata)
print (res_2)
#fit moderator model with HIER
hier1 <- robu (formula = effect_size ~ pathway, var.eff.size = effect_size_variance, studynum = cluster, modelweights = "HIER", small = TRUE, data = mydata)
print (hier1)
dput (head(mydata,35))
structure(list(Study_ID = c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L,
4L, 4L, 4L, 5L, 5L, 5L, 6L, 6L, 6L, 7L, 7L, 7L, 1L, 1L, 1L, 2L,
2L, 2L, 3L, 3L, 3L, 4L, 4L, 4L, 5L, 5L), effect_size = c(-0.05,
-0.09, -4.44, 0.28, 0.25, 0.91, 0.31, 0.31, 0.33, 0.27, 0.13,
0.71, -0.1, -0.09, -0.28, 0.2, 0.23, 1.23, 0.21, 0.22, 0.29,
-0.18, -0.16, -0.75, 0.2, 0.24, 2.47, 0.37, 0.36, 2.34, 0.17,
0.15, 0.85, 0.04, 0), effect_size_variance = c(0.010737802, 0.008056791,
30.135452, 0.010478163, 0.011260784, 0.093962475, 0.006933061,
0.008891908, 0.007840352, 0.006092875, 0.007411207, 0.040583305,
0.021610499, 0.019590468, 0.104406625, 0.012783255, 0.011467534,
0.333023923, 0.004151044, 0.008464275, 0.006936499, 0.012797742,
0.007904113, 0.307592997, 0.001625522, 0.002084078, 0.230050467,
0.009038613, 0.00895868, 0.34524772, 0.004019923, 0.002854116,
0.078314231, 0.007680706, 0), pathway = c(2L, 4L, 6L, 2L, 4L,
6L, 2L, 4L, 6L, 2L, 4L, 6L, 2L, 4L, 6L, 2L, 4L, 6L, 2L, 4L, 6L,
1L, 3L, 5L, 1L, 3L, 5L, 1L, 3L, 5L, 1L, 3L, 5L, 1L, 3L), cluster = c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L,
2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
2L, 2L), Study_Name = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L,
3L, 3L, 4L, 4L, 4L, 5L, 5L, 5L, 6L, 6L, 6L, 7L, 7L, 7L, 1L, 1L,
1L, 2L, 2L, 2L, 3L, 3L, 3L, 4L, 4L, 4L, 5L, 5L), .Label = c("Desiree Thesis Arab",
"Desiree Thesis White", "Gijs Direct Replication", "Gijs Indirect Replication",
"Irina Africa Black", "Irina Africa White", "Irina Thesis", "Max Thesis",
"Stein Race", "Yuan Exp1"), class = "factor")), row.names = c(NA,
35L), class = "data.frame")
The HIER version works with the example data provided by the robumeta authors.