我正在分析 R 程序中缺少值的平衡面板数据。
因变量是自由选择变量。
在运行随机效果模型时遇到以下错误消息:
> random<-plm(Y~X,data=pceec,model="random")
Error in solve.default(crossprod(X.m)) :
system is computationally singular: reciprocal condition number = 1.87676e-24
In addition: Warning messages:
1: In if (is.na(le)) { :
the condition has length > 1 and only the first element will be used
2: In if (is.na(le)) " __no length(.)__ " else if (give.length) { :
the condition has length > 1 and only the first element will be used
3: In if (le > 0) paste0("[1:", paste(le), "]") else "(0)" :
the condition has length > 1 and only the first element will be used
我从R elegant way to balance unbalanced panel data尝试了这个方法,因为我认为这可以填补我的缺失值。
结果是我在使用balanced
命令后将数据集清空。
我无法使用na.locf()
函数,因为我的缺失值位于数据的开头。
你能否告诉其他人使用它的方法?
编辑:
赞美错误:
> pceec<-plm.data(ceec,index=c("ID","time"))
> Y<-cbind(ERA)
> X<-cbind(CHINN,DEBT,INFL,MONEY,OPENNESS,RESERVES,RGDP)
数据集:
> dput(pceec)
structure(list(ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L,
13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L), .Label = c("BGR",
"CYP", "CZE", "EST", "HRV", "HUN", "LTU", "LVA", "MLT", "POL",
"ROM", "SVK", "SVN"), class = "factor"), time = structure(c(1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
16L, 17L, 18L, 19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L,
10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L,
17L, 18L, 19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 1L, 2L, 3L,
4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L,
18L, 19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 1L, 2L, 3L, 4L,
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L,
19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L,
13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L,
14L, 15L, 16L, 17L, 18L, 19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L,
8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L,
15L, 16L, 17L, 18L, 19L, 20L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,
9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L), .Label = c("1993",
"1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001",
"2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009",
"2010", "2011", "2012"), class = "factor"), CHINN = c(NA, -1.168828,
-1.168828, -0.905084, -0.905084, -0.905084, -0.905084, -0.905084,
-1.168828, -1.168828, -0.905084, -0.6413398, -0.3775955, 2.175265,
2.439009, 2.439009, 2.439009, 2.439009, 2.439009, NA, -0.1129656,
-0.1129656, -0.1129656, -1.168828, -1.168828, -1.168828, -1.168828,
-1.168828, -1.168828, -1.168828, -0.1129656, 1.384032, 1.647777,
1.911521, 2.175265, 2.439009, 2.439009, 2.439009, 2.439009, NA,
NA, NA, NA, -0.1129656, -0.1129656, -0.1129656, -0.1129656, 0.1507786,
1.647777, 1.911521, 2.175265, 2.439009, 2.439009, 2.439009, 2.439009,
2.439009, 2.439009, 2.439009, 2.439009, NA, NA, NA, NA, 1.911521,
2.175265, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009,
2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009,
2.439009, NA, NA, NA, NA, -0.1129656, -0.1129656, -0.1129656,
-0.1129656, -0.1129656, -0.1129656, -0.1129656, 1.120288, 1.120288,
1.120288, 1.120288, 1.120288, 1.120288, 1.120288, 1.120288, 1.120288,
NA, -1.168828, -1.168828, -1.168828, -0.1129656, -0.1129656,
-0.1129656, -0.1129656, -0.1129656, 1.384032, 1.647777, 1.911521,
2.175265, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009,
2.439009, NA, NA, NA, NA, 2.175265, 2.439009, 2.439009, 2.439009,
2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009,
2.439009, 2.175265, 1.911521, 1.647777, 1.384032, NA, NA, NA,
NA, 1.911521, 2.175265, 2.175265, 2.175265, 2.175265, 2.175265,
2.175265, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009,
2.439009, 2.439009, 2.439009, NA, -1.168828, -0.1129656, -0.8081098,
-1.168828, -1.168828, -1.168828, -1.168828, -1.168828, -1.168828,
-1.168828, -1.168828, 0.3281699, 1.647777, 1.911521, 2.175265,
2.439009, 2.439009, 2.439009, 2.439009, NA, -1.863972, -0.8081098,
-0.1129656, -1.168828, -1.168828, -1.168828, -1.168828, -1.168828,
-1.168828, 0.0644257, 0.0644257, 0.0644257, 0.0644257, 0.0644257,
0.0644257, 0.0644257, 0.0644257, 0.0644257, 0.0644257, NA, -1.863972,
-1.863972, -1.863972, -1.168828, -1.168828, -1.168828, -1.168828,
-1.168828, -1.168828, 0.0644257, 0.3281699, 1.647777, 1.911521,
2.175265, 2.439009, 2.439009, 2.439009, 2.439009, 2.439009, NA,
NA, NA, NA, -1.168828, -1.168828, -1.168828, -1.168828, -1.168828,
-1.168828, -1.168828, 0.0644257, 0.0644257, 0.3281699, 0.5919141,
0.8556583, 1.119403, 1.383147, 1.383147, 1.383147, NA, NA, NA,
NA, -1.168828, -0.1129656, -0.1129656, -0.1129656, 1.120288,
1.120288, 1.120288, 1.384032, 1.647777, 1.911521, 2.175265, 2.439009,
2.175265, 1.911521, 1.647777, 1.384032, NA), DEBT = c(NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 13.82140101,
14.93887326, 15.44619896, NA, NA, NA, NA, NA, NA, 261.728718,
155.7574546, 156.2502269, 160.8780718, 170.5201125, 179.1116438,
180.2266059, 180.5662061, 171.3756799, 96.7356357, 144.1937256,
97.56739053, 102.2997423, 113.2526569, NA, 16.48781937, 14.67202387,
12.70783399, 10.52030143, 10.15356587, 10.17878009, 11.35669558,
13.21886861, 14.87443421, 15.42556465, 18.26772521, 20.10837875,
22.03346153, 23.70805456, 24.19331983, 25.47516365, 30.87178726,
34.99728295, 38.2537664, NA, NA, NA, 9.875827385, 8.8766474,
8.42058185, 4.139266952, 5.505295373, 4.302063581, 4.095615556,
4.817197751, 5.233459351, 5.473257561, 5.864024828, 5.535902971,
4.81287326, 5.66674747, 8.950785028, 9.109930881, 6.942970339,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 89.81031033, 77.35321381, 69.48221557,
66.26605015, 68.36338612, 62.97877913, 60.76898824, 60.76334968,
63.04285456, 66.37002687, 68.83512216, 70.45937105, 70.84271523,
73.94739906, 82.84351953, 82.9759946, 82.37792168, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 23.37284562, 21.3695733,
20.99916901, 19.87988134, 18.35738599, 34.19228164, 43.35403685,
43.53618834, NA, NA, 11.19069767, 14.58974458, 13.26744904, 10.99750203,
9.54700351, 11.97419745, 12.01682427, 13.65810559, NA, NA, NA,
NA, NA, NA, 22.89317326, 42.16345422, 49.88284724, 42.12534325,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 185.1302222, 192.8527028,
193.5122253, 178.2882862, 170.9141325, 75.8456974, 81.9356132,
82.94168669, 84.04041655, NA, NA, NA, NA, NA, NA, NA, NA, 32.96342571,
41.3785683, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 45.37393175,
44.85614255, 37.1317334, 32.91680584, 31.91610243, 30.2380593,
38.24368205, 46.55843081, 45.6102019, NA, 21.12055362, 18.51055365,
16.84588811, 20.28397162, 20.91442134, 21.48695465, 22.02828204,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ERA = c(1L,
1L, 1L, 1L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
6L, 6L, NA, 5L, 5L, 5L, 5L, 5L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 6L, 6L, 6L, 6L, NA, 5L, 5L, 5L, 5L, 0L, 2L, 2L, 2L, 1L,
2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, NA, 6L, 6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, NA, 4L,
4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 5L, 0L, 4L,
4L, 4L, NA, 5L, 5L, 0L, 0L, 0L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 2L, 2L, 2L, 2L, NA, 1L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, NA, 1L, 1L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, NA, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L,
6L, 6L, NA, 0L, 0L, 0L, 0L, 0L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, NA, 1L, 1L, 1L, 1L, 0L, 2L, 2L, 2L, 4L,
4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, NA, 5L, 5L, 5L, 5L, 5L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 4L, 4L, 4L, 4L, 6L, 6L, 6L, NA, 0L,
0L, 0L, 0L, 0L, 2L, 2L, 2L, 2L, 4L, 4L, 4L, 4L, 4L, 6L, 6L, 6L,
6L, 6L, NA), INFL = c(68.89452067, 93.56390749, 60.04541489,
120.9697303, 1058.110374, 18.08247302, 2.381037536, 10.98858826,
6.23546693, 4.378871042, 1.059975277, 5.275230048, 4.420631575,
6.949600859, 6.772151187, 11.5750056, 1.573166761, 1.404937188,
2.989021435, 1.488462826, 0.869895952, 2.205158532, 0.606399087,
2.341155169, 3.341867083, 1.637920558, 1.438028472, 4.813986108,
0.851572796, 1.369895581, 3.041933627, 1.215313972, 1.940240026,
2.183862478, 0.742157177, 3.895404593, -0.805939925, 1.347186409,
2.058600601, 0.92368662, NA, 7.470554816, 7.160886884, 8.162230304,
8.284316757, 10.03680087, 1.951158973, 4.57516348, 3.580328061,
0.353839829, -0.989422969, 1.756368044, 1.227958743, 2.216092544,
1.297107905, 5.5772198, -0.135208014, 0.37464597, 0.705540354,
1.832990801, 85.82767831, 45.16125984, 26.76719493, 22.41257365,
10.31840157, 7.618546565, 3.104139369, 4.69827344, 4.613783954,
2.140023859, 0.241157716, 1.977168612, 3.471477961, 4.117902416,
4.967303028, 9.59183654, -1.264796394, 1.941508375, 3.746765989,
2.46883924, 1496.015729, 104.8341554, 1.940685157, 3.662230304,
3.907184193, 5.80689984, 3.827167228, 5.283644008, 2.644990196,
0.253062563, 0.653050551, 0.976808587, 2.702747206, 2.902203899,
1.229764161, 5.317882647, 1.216738441, 0.0015431, 1.019151206,
1.956900547, 18.46678274, 16.37295926, 26.29345157, 22.79037402,
18.05065242, 13.58528015, 9.83895425, 10.45291479, 8.030788707,
3.830281183, 3.551325823, 5.709056679, 2.932596354, 3.56629992,
6.304673309, 5.292390665, 3.029169942, 3.847273122, 2.726418437,
4.239747004, 406.256717, 69.65670824, 37.64737798, 23.9803578,
8.614412981, 4.485147531, 0.561737871, 1.679115791, 0.229651367,
-1.13291693, -2.242884762, 0.110418647, 2.025250977, 3.433024568,
4.099908538, 10.15364498, 3.255997385, 0.300162128, 2.902484539,
1.614903578, 104.7834598, 33.43166158, 22.97001407, 16.97350899,
8.174354733, 4.068517165, 2.166871465, 3.320920745, 1.353183622,
0.491817452, 1.859491465, 5.116514248, 6.124960356, 6.22186537,
8.476838023, 14.62943067, 2.347653559, -2.12232124, 3.152004569,
0.785962357, 0.160548827, 1.636491038, 2.41722671, 1.416230304,
2.848600559, 1.795464586, 1.94279736, 3.041921336, 1.804008857,
0.75723101, 0.206706014, 1.719925385, 2.389754565, 2.461251718,
-0.37898616, 3.482970458, 0.905337431, 0.482761812, 1.491056375,
0.951542306, 32.88153432, 30.75869771, 26.06227768, 19.17945154,
14.8181395, 11.13536692, 7.083028472, 10.73214358, 4.365764296,
0.468914489, -0.309213178, 2.505644136, 1.488838798, 0.802931491,
0.757724135, 3.575611747, 2.645957976, 1.673380405, 3.027484539,
2.090787617, 251.1825911, 134.265962, 30.23306593, 38.19153164,
154.5000031, 58.50679599, 45.6118096, 46.33892251, 33.34228373,
21.10595053, 14.17683938, 10.80596477, 8.370844841, 6.27257596,
3.205443818, 7.074558656, 4.407643597, 5.060143833, 4.556928586,
1.867717914, NA, 10.9167027, 7.877750089, 5.171485258, 5.846056108,
6.108485138, 10.37847422, 12.70810524, 6.204147329, 1.892051179,
7.457011294, 6.477597786, 2.090872986, 4.171318751, 1.12638815,
3.824413275, 0.43508474, -0.077053821, 2.688437197, 2.140020297,
28.87406262, 18.50010871, 11.45351537, 9.15451517, 8.098292364,
7.323560048, 5.957481952, 9.551132139, 7.297001041, 6.038828058,
4.4816701, 2.5181237, 1.859242437, 2.150549111, 1.980829766,
4.878079781, -0.324099786, 0.806893393, 0.579731127, 1.132215305
), MONEY = c(78.96788223, 79.70281583, 67.02978372, 83.30492066,
35.17443875, 28.90920096, 30.99875517, 35.97481045, 40.92721065,
41.75303846, 46.25983651, 51.21172707, 55.53534932, 61.91482825,
69.93832611, 66.12313685, 69.86326874, 71.96151683, 75.58550182,
79.55665148, 129.3675757, 131.4806475, 128.6485046, 136.9487074,
145.3864396, 147.0066966, 159.3015, 161.2947176, 169.5276212,
175.6224217, 174.5080264, 171.4267582, 176.9652918, 189.8620473,
206.7065572, NA, NA, NA, NA, NA, 60.92063478, 63.44783757, 70.78822385,
65.59993188, 62.32748907, 58.90282855, 57.98895591, 63.69128011,
65.63634827, 55.65605855, 56.64938189, 55.81345513, 58.23563505,
61.13655108, 64.9819949, 70.24647315, 72.07127255, 72.80557549,
74.20307208, 77.3176603, NA, NA, 16.28198341, 18.59581587, 22.64679373,
21.32290822, 24.66368542, 27.98839916, 31.03625086, 31.54308533,
31.64045263, 57.85539671, 62.89230872, 61.42038589, 56.4714398,
56.99786929, 60.17466759, 59.63639818, NA, NA, 25.67026814, 19.98780826,
21.28146569, 28.87352708, 35.01150035, 35.85125068, 34.25665312,
40.74994965, 55.16256992, 55.62451845, 56.30204053, 56.94932728,
58.4197594, 63.18653998, 68.34564154, 66.1094327, 68.67076542,
78.50532933, 78.16956915, 80.65965013, 54.3350177, 50.4352498,
47.40376214, 47.34034318, 45.71735941, 44.68045757, 46.43259896,
45.71290339, 46.09235051, 46.2863332, 51.07127285, 49.2514023,
52.02800082, 54.84216089, 57.60302658, 58.92434289, 63.0498303,
63.4922675, 64.8870481, 60.87321879, 23.06471096, 25.77555608,
20.86731738, 16.09189946, 17.94874959, 18.49845167, 20.44411024,
22.86014763, 26.19698213, 28.50868349, 31.12357223, 35.4765239,
41.1515895, 43.9784619, 44.87625812, 39.60616364, 48.55018173,
50.89440693, 47.47771691, 47.38483506, 31.6473756, 34.17121175,
21.27219875, 21.33064595, 25.22756743, 24.56809039, 24.33920343,
27.75907666, 30.26917736, 32.91405053, 34.77361485, 37.87769754,
43.32659977, 49.26778617, 42.70014296, 37.29869945, 44.89101908,
51.41357898, 46.66134275, 44.11783657, 97.77683268, 106.1592034,
110.2402478, 116.4126078, 120.6724805, 125.3530212, 131.8760714,
123.5668284, 156.0884931, 163.0033367, 161.1434804, 150.6851493,
147.5321398, 147.6344025, 152.1430848, NA, NA, NA, NA, NA, 33.47353185,
31.98627557, 31.69277212, 33.19737536, 35.11881075, 37.70207735,
40.69940688, 40.60334482, 44.4362372, 41.98616138, 42.4262879,
40.21143533, 43.50525068, 46.92579745, 47.82156081, 52.36351657,
53.71374196, 55.42878357, 57.87980215, 57.87982791, 28.79255586,
26.12976897, 30.58119755, 34.33863042, 31.56100706, 32.83360067,
33.82383876, 32.33703427, 26.27066873, 29.68805324, 27.55867111,
32.79993702, 33.65938723, 32.13648505, 35.89669667, 33.82315729,
37.87642747, 38.80005701, 37.31145552, 37.78761759, 61.15405566,
59.60914754, 60.66020951, 63.23684312, 61.9963394, 59.33261741,
61.66891001, 64.03492616, 66.55383486, 63.50001349, 54.86765959,
56.68681216, 54.68544393, 56.32768785, 56.87940867, 54.92974214,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA), OPENNESS = c(84.04148545, 90.72012785,
101.8271665, 116.1971199, 112.0938612, 117.1780783, 116.5593551,
106.2621055, 106.8660521, 102.9803349, 107.3846266, 115.3229367,
96.16403889, 140.00543, 138.6499918, 136.949385, 103.8483695,
116.7151556, 132.2741747, 136.9515689, 95.41637402, 95.77615252,
100.1037057, 104.4416258, 105.3995874, 100.5282431, 101.757892,
109.8712906, 109.9020613, 103.0649958, 95.17382146, 98.02155335,
99.20612861, 99.76019554, 102.1400302, 101.6254989, 85.82792399,
86.67220155, NA, NA, 94.12769898, 90.04033769, 99.78698239, 98.18406823,
104.0736921, 105.0109552, 107.2165817, 124.0086884, 126.7486932,
116.447208, 119.381669, 125.0827196, 126.1367896, 130.9370432,
133.7710948, 126.5060567, 113.8718253, 129.8170346, 141.6332736,
150.4585632, NA, NA, 143.7179084, 134.7434335, 154.3553107, 159.1496939,
145.7897864, 172.7948897, 162.1300543, 149.2192177, 145.8703769,
153.2040725, 161.9353192, 155.6454263, 143.3739112, 146.1357753,
122.2064814, 151.5067996, 177.3375262, 180.8979229, 105.9650278,
91.75941332, 74.66604318, 78.40889339, 84.43478725, 77.47832496,
79.19307308, 86.48386662, 90.60849913, 90.04409672, 92.82660462,
92.06359647, 90.92033939, 92.41099232, 91.81608344, 91.89331528,
76.74071641, 80.00042773, 84.61542763, 86.06556955, 61.55491624,
64.89431281, 90.12496707, 97.26704556, 109.4905613, 124.7690281,
131.7502507, 152.6583792, 145.0008468, 128.3529198, 126.6559876,
130.2918681, 134.001148, 156.4032928, 161.7176314, 162.8654624,
150.3233089, 168.0630567, 180.5012297, NA, 172.9016402, 116.7723585,
105.3835898, 109.1377282, 113.1588949, 101.4645839, 87.27803033,
95.76970842, 105.0877009, 111.1276913, 108.1363217, 111.1828485,
122.177923, 128.3449769, 121.5264961, 131.5676974, 110.6820331,
138.187249, 156.5104414, NA, 130.2181322, 90.8494492, 87.5469943,
101.0662852, 101.5015858, 106.7975095, 89.9670903, 90.31615179,
92.68561261, 91.49535672, 96.71695153, 103.5328216, 110.0826793,
111.2338429, 104.726441, 99.28055145, 89.25447506, 109.047353,
121.5114324, NA, 178.9054338, 181.7019463, 179.3338738, 167.8851768,
160.4646891, 163.2107217, 171.0564001, 188.9774697, 163.0670335,
162.3427202, 157.3654611, 159.0125582, 156.7217471, 177.5077845,
180.7941193, 177.0591459, 157.7877639, 172.9496893, 185.5022935,
NA, 41.05223192, 41.26984163, 44.2465201, 46.04792205, 50.74269481,
56.79411951, 54.29510521, 60.67078823, 57.77678292, 60.73279263,
69.31848911, 77.33549081, 74.91126836, 82.51673772, 84.38852522,
83.76331224, 78.80572562, 85.68773797, 91.29238718, 91.9997124,
51.00369936, 51.86707001, 60.82927135, 64.71002465, 65.41719447,
53.27005779, 60.86839403, 70.5914681, 74.46352454, 76.4830536,
76.89638869, 80.96167927, 76.20539448, 68.18852263, 73.57621774,
73.90188459, 67.24366514, 76.18112026, 81.8362363, 75.56484313,
116.9348272, 113.2022693, 113.3092331, 117.4438733, 122.3418682,
129.1833372, 126.8180934, 143.4736581, 153.5098819, 149.5165658,
153.6020099, 151.8684993, 157.1687775, 173.0136412, 174.8163254,
169.3228654, 142.5879841, 163.8001325, 175.7176224, NA, 116.4165437,
115.2014835, 101.1237517, 100.776851, 103.4629999, 103.6353427,
98.64583785, 110.8680986, 111.1888697, 108.9876134, 107.8240756,
116.9086478, 124.764116, 133.598327, 140.8368678, 137.5052976,
115.3428892, 130.2847534, 141.5175657, NA), RESERVES = c(1052450357,
1396927258, 1635188166, 864262494.1, 2485359931, 3056954172,
3264673405, 3507199103, 3646131855, 4846429828, 6825720096, 9337108247,
8697081229, 11756001804, 17544560083, 17930378450, 18522120691,
17223201500, 17215734344, 20507099766, 1276350873, 1640273818,
1294935266, 1704484151, 1525648570, 1512684182, 1967461070, 1868515552,
2396061109, 3181358048, 3450932640, 4113824175, 4429824674, 5942554106,
6506542509, 1004746555, 1281245174, 1141718168, 1187123277, 1191085668,
4551181369, 6948563350, 14612514155, 13084766355, 10035803026,
12624991439, 12935556426, 13141569753, 14463996079, 23707070645,
26955067756, 28451131839, 29553533244, 31456871115, 34907225421,
37021635007, 41608025194, 42482656052, 40283021631, 44884691160,
389247606.4, 446418562, 583006267.3, 639770387.4, 760039371.1,
812906422.9, 855813707.1, 922839655.6, 822453577.7, 1003157301,
1376698670, 1791730277, 1947311947, 2786325227, 3269362368, 3971834389,
3980640980, 2567137793, 207115954.6, 300659810.9, 616200825,
1404995150, 1895724350, 2313999030, 2539059752, 2815738591, 3024995790,
3524350338, 4703235128, 5884888200, 8190523098, 8758177308, 8800316453,
11487840810, 13674518993, 12957286637, 14894514373, 14132504961,
14483806529, 14807134355, 6744523366, 6777626276, 12017181563,
9757458267, 8437175590, 9347792760, 10983333005, 11217315623,
10755092652, 10383089943, 12793544565, 15965390206, 18602834458,
21589904273, 24052211100, 33873898904, 44181292183, 44988178945,
48831920688, 44670620439, 422943421.4, 596691631.7, 828984764.7,
841037164.5, 1064038330, 1462691472, 1249084970, 1362679202,
1669177344, 2413140588, 3449667625, 3593962686, 3815556165, 5772525484,
7711952181, 6442845969, 6623187429, 6598353023, 8201665408, 8529340692,
526398174.9, 640693740.8, 602076781.1, 746119791.7, 832492439.1,
872976183.8, 944355642.8, 919162856.4, 1217482763, 1326623372,
1536170568, 2020863044, 2359714950, 4511469902, 5760724076, 5243938989,
6902262629, 7605712549, 6378031619, 7524707971, 1401663051, 1890025826,
1620329964, 1636087069, 1490757865, 1664438098, 1789768390, 1471281954,
1667548395, 2210545483, 2730176861, 2733736253, 2578481095, 2980332941,
3798767206, 373422746.2, 538508822.1, 540153472.9, 515098490.9,
704900061.3, 4276726138, 6023061884, 14957024390, 18018686050,
20669498248, 28276350644, 27314254555, 27469379821, 26563086922,
29783861006, 33958963841, 36772764782, 42560657450, 48473947849,
65724834811, 62183606786, 79521598778, 93472496388, 97712443397,
1.08902e+11, 1921318133, 3092362958, 2624348247, 3143305792,
4679435834, 3795239432, 2490772917, 3395672577, 4857637362, 7285846575,
9449445049, 16095478769, 21601177537, 30206004058, 39974195970,
39768375717, 44383053416, 48047827695, 48044370164, 46711176521,
919587371.3, 2185568839, 3862773676, 3895192648, 3604685659,
3240043067, 3745098698, 4376328678, 4453132136, 9195618257, 12149157812,
14911965835, 15479863363, 13364307417, 18973379157, 18836137106,
1803646824, 2155731815, 2417987711, 2519014816, 787924762, 1499101326,
1820915561, 2297475330, 3314759606, 3638608389, 3168097481, 3196099289,
4397212845, 7063482326, 8598243614, 8899759253, 8159730205, 7139432938,
1065303830, 957648198.5, 1078161476, 1070759591, 986894540.6,
951915203.8), RGDP = c(100, 101.9220658, 104.4839149, 95.38304238,
93.68869235, 97.96298561, 99.87454727, 105.591921, 109.9478097,
114.9480326, 120.9328675, 128.7653354, 136.8223682, 145.511543,
154.4341179, 163.6529144, 154.7548279, 155.4006564, 158.0084556,
159.348438, 100, 105.7732358, 111.9655264, 114.0238994, 116.7555866,
122.5589293, 128.4705687, 135.0097041, 140.3917784, 143.2003453,
145.5952779, 151.4732402, 157.2827045, 163.6380516, 171.731247,
177.6856887, 174.8499881, 177.1535033, 177.7304866, 173.614023,
100, 102.7384259, 108.8661742, 113.6744545, 112.800479, 112.4508441,
114.3691083, 119.2179873, 122.797706, 125.1689911, 129.613866,
135.5067855, 144.4656901, 154.404532, 162.9250334, 167.5684875,
160.2257716, 164.1720313, 167.012634, 165.4585068, 100, 98.33018528,
102.6444758, 108.601421, 121.273949, 129.4007604, 129.0250041,
141.5434932, 150.2939865, 159.8927763, 171.758774, 182.2717478,
198.1257125, 217.7171012, 233.357799, 223.4830762, 192.3837255,
197.3551291, 215.8558129, 224.3740409, 100, 99.66259716, 99.15211367,
104.9639271, 111.8251841, 113.9593505, 112.8629846, 117.1720711,
121.3723337, 127.1103479, 133.5724428, 138.8185214, 144.6304303,
151.6058614, 158.9887033, 162.0276702, 150.9424196, 148.9031881,
147.4506529, 144.5985677, 100, 102.8713473, 104.3259764, 104.4853616,
107.7391035, 112.094972, 115.6723352, 120.6045781, 124.9169423,
130.2219733, 134.8996982, 141.0741644, 146.5507489, 152.2326912,
152.0884657, 153.2457548, 143.1014022, 144.891987, 147.0972412,
144.7340894, 100, 90.29670704, 93.14475261, 97.91066445, 105.0259765,
112.9215268, 111.7379785, 115.3231334, 123.0178451, 131.2583795,
144.2961107, 154.5972687, 166.4254936, 179.2167829, 196.3143696,
201.6522676, 172.3693785, 174.6874758, 184.8528175, 191.7151614,
100, 102.0572195, 101.0577598, 104.8212893, 113.4005829, 118.6668018,
124.1226224, 132.6116153, 143.1969698, 152.2928709, 162.9457634,
176.7107661, 195.1509122, 218.5505621, 239.3885729, 228.8219076,
188.2666115, 187.7556825, 197.3571282, 207.232452, 100, 105.5443176,
112.0268514, 116.2360297, 122.3586774, 128.5709767, 134.6063067,
143.7023749, 141.4895995, 145.3309889, 145.2443933, 144.3648557,
149.5704219, 152.7943616, 159.0640885, 165.7847042, 161.4752791,
165.841231, 168.6256794, 170.3876314, 100, 105.1391162, 112.1509073,
119.005788, 127.4353042, 133.6559672, 139.7422509, 145.6660621,
147.2589562, 149.3246384, 154.9589508, 162.9841136, 168.5495612,
178.8365585, 190.5332595, 199.8346506, 203.4038506, 211.5010309,
220.7118885, 224.83572, 100, 103.8294308, 111.0769249, 115.5343789,
108.4851391, 103.0797459, 102.0024424, 104.0954101, 109.9164505,
115.3025274, 120.9076396, 131.6083962, 136.8467152, 148.4500493,
157.1627855, 169.2078376, 158.0349691, 156.5456772, 159.9909251,
160.6725558, 100, 105.9850636, 111.8798773, 119.555904, 124.8768061,
130.2192072, 130.238572, 132.0739711, 136.5994492, 142.6650389,
149.0160745, 156.2202527, 166.4706386, 180.1549983, 198.6659387,
209.7642126, 199.6480942, 208.002889, 214.0327668, 217.9864763,
100, 105.1923608, 108.5446975, 112.4932731, 118.1087505, 122.1834182,
128.6588444, 134.2812096, 138.1936725, 143.3043358, 147.1306159,
153.3705352, 159.4312742, 168.61331, 179.835345, 186.0126753,
171.3060965, 173.7443344, 174.8367644, 170.6353517)), .Names = c("ID",
"time", "CHINN", "DEBT", "ERA", "INFL", "MONEY", "OPENNESS",
"RESERVES", "RGDP"), row.names = c(21L, 22L, 23L, 24L, 25L, 26L,
27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L,
40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L,
53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L,
66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L,
79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L,
92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 241L, 242L, 243L,
244L, 245L, 246L, 247L, 248L, 249L, 250L, 251L, 252L, 253L, 254L,
255L, 256L, 257L, 258L, 259L, 260L, 221L, 222L, 223L, 224L, 225L,
226L, 227L, 228L, 229L, 230L, 231L, 232L, 233L, 234L, 235L, 236L,
237L, 238L, 239L, 240L, 201L, 202L, 203L, 204L, 205L, 206L, 207L,
208L, 209L, 210L, 211L, 212L, 213L, 214L, 215L, 216L, 217L, 218L,
219L, 220L, 181L, 182L, 183L, 184L, 185L, 186L, 187L, 188L, 189L,
190L, 191L, 192L, 193L, 194L, 195L, 196L, 197L, 198L, 199L, 200L,
161L, 162L, 163L, 164L, 165L, 166L, 167L, 168L, 169L, 170L, 171L,
172L, 173L, 174L, 175L, 176L, 177L, 178L, 179L, 180L, 1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L,
17L, 18L, 19L, 20L, 141L, 142L, 143L, 144L, 145L, 146L, 147L,
148L, 149L, 150L, 151L, 152L, 153L, 154L, 155L, 156L, 157L, 158L,
159L, 160L, 121L, 122L, 123L, 124L, 125L, 126L, 127L, 128L, 129L,
130L, 131L, 132L, 133L, 134L, 135L, 136L, 137L, 138L, 139L, 140L,
101L, 102L, 103L, 104L, 105L, 106L, 107L, 108L, 109L, 110L, 111L,
112L, 113L, 114L, 115L, 116L, 117L, 118L, 119L, 120L), class = c("plm.dim",
"data.frame"))
答案 0 :(得分:1)
据我所知,这与平衡面板数据无关。在我的测试中,似乎最大的问题是RESERVES的规模与其他值不同,这使得数值不稳定。
我试过
pceec$RESV<-as.numeric(scale(pceec$RESERVES))
然后跑
plm(ERA~CHINN+DEBT+INFL+MONEY+OPENNESS+RESV+RGDP, data=pceec, model="random")
没有错误。当然,解释会有所不同。如果您想使其更具解释性,您可能需要考虑其他缩放方法。