首页 > 解决方案 > R 中的 plm 模型,“`.rowNamesDF<-`(x, value = value) 中的错误:不允许重复的 'row.names'”

问题描述

这是数据https://drive.google.com/file/d/1dEkCfGUAhbCUr34FXeHjK8YhZ3j0yXTo/view?usp=sharing

这是我的代码:

图片

library(plm)
page1.p <- pdata.frame(page1, index = c("tract", "YearBuilt"))
fm <- plm(log_salesprice ~ firstc0+firstc1+firstc2+firstc3+firstc4+firstc5+firstc0+
          firstcneg5p+firstcneg4+firstcneg3+firstcneg2+firstcneg1, data=page1.p, 
          model = "random")

错误:

`.rowNamesDF<-`(x, value = value) 中的错误:不允许重复的 'row.names'

标签: rplm

解决方案


推荐阅读