在R中,FELM中的weights参数表示即使在数据集中也没有找到weight变量。
# Reproducible example for felm weights problem
df <- NULL
df$y <- rnorm(1000)
df$x0 <- rnorm(1000)
df$x1 <- sample(1:10, 1000, replace=T)
df$weightvar <- sample(1:10, 1000, replace=T)
df1 <- data.frame(df)
reg <- felm(y ~ x0 | factor(x1) | 0 | 0
, data = df1, weights = weightvar)
eval(mf [[wpos]],pf)中的错误:找不到对象'weightvar'追溯:
- felm(y〜x0 | factor(x1)| 0 | 0,数据= df1,权重= weightvar)
- makematrix(mf,对比,pf = parent.frame(),clustervar,通配符=通配符)
- eval(mf [[wpos]],pf)
- eval(mf [[wpos]],pf)