1

我正在使用 plm 包在 R 中对随机效应回归模型进行面板数据分析,但是当我尝试构建随机效应模型时,我不断收到以下错误消息:

尝试:random <- plm(Y ~ X, data=pdata2, model="random")

引发异常:

 Error in solve.default(M[therows, therows], quad[therows]) : 
   Lapack routine dgesv: system is exactly singular: U[2,2] = 0

在哪里Y <- cbind(log(FDI))X <- cbind(RW, IY, LP, TFP, GDP, GDPG, SER)

我试图使用上图中提供的变量来解释 FDI 和行业组(AGR、MAN、NAT、TRN)之间的差异(黄色突出显示 = 部门特定数据,蓝色突出显示 = 非部门特定数据)

关于我做错了什么或如何解决这个问题的任何想法?

数据(CSV,单列,应该可以直接按 ctrl-c/v 进入 Excel):

Year,Industry,FDI,RW,IY,LP,TFP,GDP,GDPG,SER,IR,PS,CAD
1998,AGR,623750000,20.28,0.062090122,2.78,-0.02,0.173910594,-0.039992037,114.20,0.51,-0.39,-0.0022237
1998,MAN,25582380000,18.45,0.021821841,12.53,0.24,0.400665528,-0.032838658,122.23,0.51,-0.39,-0.0022237
1998,NAT,3680880000,5.51,0.063121502,5.18,0.03,0.119030935,0.117957321,125.01,0.51,-0.39,-0.0022237
1998,TRN,1645130000,8.94,0.36882592,6.72,0.16,0.054715331,0.05122379,138.21,0.51,-0.39,-0.0022237
1999,AGR,710150000,16.06,0.066979205,2.62,-0.01,0.163074011,-0.062311227,121.11,0.74,-0.31,-0.0027106
1999,MAN,22603340000,13.94,0.027213738,13.05,0.13,0.397677233,-0.007458328,118.23,0.74,-0.31,-0.0027106
1999,NAT,4259880000,5.09,0.073121513,5.22,0.06,0.130564549,0.096895936,121.92,0.74,-0.31,-0.0027106
1999,TRN,1551140000,11.36,0.410087212,6.87,0.15,0.057151596,0.044526182,131.02,0.74,-0.31,-0.0027106
2000,AGR,675940000,13.80,0.07437672,2.71,0.02,0.149018599,-0.086190389,119.60,0.54,-0.21,0.0000121
2000,MAN,25844170000,11.16,0.039265778,13.97,0.26,0.401472476,0.009543525,115.01,0.54,-0.21,0.0000121
2000,NAT,2825400000,9.14,0.088794127,5.80,0.07,0.140514419,0.076206525,120.13,0.54,-0.21,0.0000121
2000,TRN,1011880000,9.89,0.447359571,7.51,0.17,0.061446887,0.075156104,129.49,0.54,-0.21,0.0000121
2001,AGR,898730000,15.51,0.077400517,3.12,0.07,0.142337712,-0.044832571,117.20,0.37,-0.27,-0.0001691
2001,MAN,30907470000,10.31,0.075096285,14.66,0.25,0.395583382,-0.014668736,114.73,0.37,-0.27,-0.0001691
2001,NAT,3083780000,8.97,0.124662502,6.15,0.06,0.153169991,0.090066,118.73,0.37,-0.27,-0.0001691
2001,TRN,908900000,11.16,0.549553032,7.65,0.20,0.061980046,0.008676736,126.68,0.37,-0.27,-0.0001691
2002,AGR,1027640000,13.81,0.087932413,3.02,0.08,0.135853214,-0.045557132,117.25,0.50,-0.33,0.0000121
2002,MAN,36799980000,9.00,0.181404226,14.84,0.14,0.392518243,-0.007748401,111.13,0.50,-0.33,0.0000121
2002,NAT,1956140000,8.25,0.208817955,6.11,0.03,0.162803346,0.062893229,115.41,0.50,-0.33,0.0000121
2002,TRN,913460000,9.32,0.62503745,8.03,0.21,0.061571312,-0.006594602,120.01,0.50,-0.33,0.0000121
2003,AGR,1000840000,12.91,0.095065763,3.45,0.14,0.12647611,-0.069023792,107.03,0.27,-0.56,0.0000121
2003,MAN,36935700000,7.18,0.265327344,14.68,0.17,0.402874358,0.026383779,103.70,0.27,-0.56,0.0000121
2003,NAT,1631730000,8.05,0.267459013,6.33,0.17,0.165542635,0.016825754,107.91,0.27,-0.56,0.0000121
2003,TRN,867370000,8.07,0.660939,7.85,0.22,0.057594854,-0.064582969,108.98,0.27,-0.56,0.0000121
2004,AGR,790663600,12.51,0.088306314,3.79,0.17,0.132295314,0.046010297,100.00,-0.17,-0.39,-0.0000483
2004,MAN,39694305000,6.25,0.297756808,15.24,0.19,0.406430541,0.008827027,100.38,-0.17,-0.39,-0.0000483
2004,NAT,1566460800,7.84,0.285906792,7.12,0.17,0.165262401,-0.001692822,100.58,-0.17,-0.39,-0.0000483
2004,TRN,1040844000,7.61,0.656756031,8.13,0.16,0.057504254,-0.00157305,101.59,-0.17,-0.39,-0.0000483
2005,AGR,718260000,12.70,0.103659853,4.08,0.12,0.119668651,-0.09544301,99.98,0.27,-0.50,-0.0100522
2005,MAN,42452910000,5.69,0.340890194,15.42,0.16,0.416191319,0.024015857,99.98,0.27,-0.50,-0.0100522
2005,NAT,1749320000,8.35,0.33385261,7.00,0.26,0.169363583,0.024816182,99.97,0.27,-0.50,-0.0100522
2005,TRN,1812300000,7.75,0.766084283,8.34,0.16,0.056955278,-0.009546708,99.98,0.27,-0.50,-0.0100522
2006,AGR,599450000,14.34,0.087879217,3.99,0.13,0.109535929,-0.084673149,102.80,0.28,-0.54,-0.0270089
2006,MAN,40076710000,5.44,0.369580457,15.28,0.27,0.420338272,0.009964056,100.44,0.28,-0.54,-0.0270089
2006,NAT,1741880000,10.23,0.36138185,7.36,0.07,0.168073971,-0.007614459,102.96,0.28,-0.54,-0.0270089
2006,TRN,1984850000,6.64,0.838786178,8.28,0.17,0.055534011,-0.024954091,100.08,0.28,-0.54,-0.0270089
2007,AGR,924070000,11.87,0.077334517,4.15,0.22,0.105922571,-0.03298788,101.88,-0.03,-0.50,-0.0459717
2007,MAN,40864820000,4.84,0.398456227,15.42,0.22,0.413325498,-0.016683645,101.10,-0.03,-0.50,-0.0459717
2007,NAT,1561990000,9.63,0.381178033,7.24,0.11,0.164643901,-0.020408096,103.25,-0.03,-0.50,-0.0459717
2007,TRN,2006760000,6.63,0.844526912,8.45,0.14,0.054046463,-0.026786246,99.50,-0.03,-0.50,-0.0459717
2008,AGR,1191020000,14.25,0.087020128,4.62,0.16,0.105469375,-0.004278562,101.10,-1.07,-0.49,-0.0865261
2008,MAN,49894830000,5.14,0.430451629,15.50,0.21,0.412272957,-0.002546519,106.92,-1.07,-0.49,-0.0865261
2008,NAT,2268850000,5.84,0.406255642,8.00,0.23,0.166073946,0.008685688,109.23,-1.07,-0.49,-0.0865261
2008,TRN,2851310000,7.74,0.868795669,8.16,0.15,0.05122631,-0.052180161,103.13,-1.07,-0.49,-0.0865261
4

0 回答 0