robumeta 参数意味着不同的行数

robumeta arguments imply differing number of rows

我正在尝试使用 robumeta,但一直 运行 出错。 我对 8 个变量使用了 113 个观察值:

EM <- read.csv(file="SchoolMotivationRisk.csv", header=TRUE,sep=",")

八个变量是:studynum yi var.effect.size sei aget1 aget2 permale sexmix.

执行 str(EM) 会产生 'data.frame':113 obs。 8 个变量。

问题是我什么时候适合:

res<-robu(formula = yi ~ 1, var.effect.size = var.effect.size, studynum = studynum, modelweights = "CORR", rho= 0.8, small=TRUE, data=EM)

我收到以下错误:

Error in data.frame(effect.size = mf[, 1], stats::model.matrix(formula,  : arguments imply differing number of rows: 113, 0

有办法解决这个问题吗?

此外,dput(EM) 的输出位于 https://pastebin.com/vmMwy1u4

参数是var.eff.size而不是var.effect.size

library(robumeta)
robu(formula = yi ~ 1, var.eff.size = var.effect.size, 
   studynum = studynum, modelweights = "CORR", rho= 0.8, small=TRUE, data=EM)
#RVE: Correlated Effects Model with Small-Sample Corrections 

#Model: yi ~ 1 

#Number of studies = 17 
#Number of outcomes = 113 (min = 2 , mean = 6.65 , median = 7 , max = 12 )
#Rho = 0.8 
#I.sq = 57.54005 
#Tau.sq = 0.004609755 

#               Estimate StdErr t-value dfs   P(|t|>) 95% CI.L 95% CI.U Sig
#1 X.Intercept.    0.113 0.0184    6.12  14 0.0000263   0.0733    0.152 ***
#---
#Signif. codes: < .01 *** < .05 ** < .10 *
#---
#Note: If df < 4, do not trust the results