1

在 R 中,我在使用包中的pgmm()函数时遇到了plm无法通过调试解决的错误。这是导致错误的调用:

emp.gmm = pgmm(growth ~ lgdp_pc + lschool | 
  lag(lgdp_pc,2), 
  data=temp1.subset, 
  effect='twoways', model='twosteps')

错误信息是:

Error in yX[[1]] : subscript out of bounds
In addition: Warning message:
In `[.data.frame`(index, as.numeric(rownames(mf)), ) :
  NAs introduced by coercion

这是数据框 temp1.subset 的结构,使用dput()

structure(list(growth = structure(c(NaN, NaN, NaN, NaN, -0.000154495239257812, 
-0.0161255836486816, -0.0161551475524902, 0.0574196815490723, 
0.0497237205505371, 0.0457057952880859, NaN, NaN, -0.0703577995300293, 
0.0167842864990234, -0.0930408477783203, -0.0327302932739258, 
-0.0194591522216797, -0.00672683715820313, 0.0186029434204102, 
0.0169768333435059, 0.0181658267974854, 0.0245670318603516, 0.0144176483154297, 
0.0118904113769531, -0.0398967742919922, -0.0192060470581055, 
0.0499397277832031, 0.013348388671875, 0.0102230072021484, 0.0554094314575195, 
NaN, NaN, NaN, NaN, NaN, NaN, -0.108685398101807, 0.0593433380126953, 
0.116020393371582, 0.0333575248718262, NaN, 0.0355857849121094, 
0.0102117538452148, 0.0167465209960938, 0.013456916809082, 0.0224128723144531, 
0.0125150680541992, 0.0307027816772461, 0.0188102722167969, 0.0116562843322754, 
0.0342285633087158, 0.0463666915893555, 0.035101318359375, 0.0326730728149414, 
0.0143096923828125, 0.0243467330932617, 0.014262580871582, 0.027958869934082, 
0.0103265762329102, 0.0110832214355469, 0.0390259027481079, 0.0521463394165039, 
-0.00384244918823242, 0.0173358917236328, 0.0171653747558594, 
0.00626802444458008, -0.0418449401855469, -0.0240262985229492, 
-0.00464649200439453, 0.0116527557373047, 0.0413355827331543, 
0.0421024322509766, 0.0318218231201172, 0.0301837921142578, 0.00917606353759766, 
0.0281953811645508, 0.0124330520629883, 0.0258995056152344, 0.0112407684326172, 
0.00453147888183594, 0.0137679576873779, 0.00525884628295898, 
-0.0108115196228027, 0.0126751899719238, 0.0149676322937012, 
-0.0217413902282715, 0.00618104934692383, 0.0217741966247559, 
0.00468902587890625, 0.00880584716796875, 0.0183011293411255, 
0.00738563537597656, -0.0515353202819824, 0.014140796661377, 
0.0103920936584473, 0.0134731292724609, 0.0225117683410645, 0.0319003105163574, 
0.036073112487793, 0.0455719947814941, NaN, NaN, NaN, NaN, 0.0311300277709961, 
0.0200127601623535, -0.0190550804138184, 0.010537052154541, 0.0614358901977539, 
0.0308845520019531, NaN, NaN, NaN, NaN, -0.049329948425293, 0.00992908477783203, 
0.0339340209960938, 0.0186641693115234, 0.0365270614624023, 0.0473820368448893
), .Names = c("ALB-1961", "ALB-1966", "ALB-1971", "ALB-1976", 
"ALB-1981", "ALB-1986", "ALB-1991", "ALB-1996", "ALB-2001", "ALB-2006", 
"ARE-1961", "ARE-1966", "ARE-1971", "ARE-1976", "ARE-1981", "ARE-1986", 
"ARE-1991", "ARE-1996", "ARE-2001", "ARE-2006", "ARG-1961", "ARG-1966", 
"ARG-1971", "ARG-1976", "ARG-1981", "ARG-1986", "ARG-1991", "ARG-1996", 
"ARG-2001", "ARG-2006", "ARM-1961", "ARM-1966", "ARM-1971", "ARM-1976", 
"ARM-1981", "ARM-1986", "ARM-1991", "ARM-1996", "ARM-2001", "ARM-2006", 
"AUS-1961", "AUS-1966", "AUS-1971", "AUS-1976", "AUS-1981", "AUS-1986", 
"AUS-1991", "AUS-1996", "AUS-2001", "AUS-2006", "AUT-1961", "AUT-1966", 
"AUT-1971", "AUT-1976", "AUT-1981", "AUT-1986", "AUT-1991", "AUT-1996", 
"AUT-2001", "AUT-2006", "BDI-1961", "BDI-1966", "BDI-1971", "BDI-1976", 
"BDI-1981", "BDI-1986", "BDI-1991", "BDI-1996", "BDI-2001", "BDI-2006", 
"BEL-1961", "BEL-1966", "BEL-1971", "BEL-1976", "BEL-1981", "BEL-1986", 
"BEL-1991", "BEL-1996", "BEL-2001", "BEL-2006", "BEN-1961", "BEN-1966", 
"BEN-1971", "BEN-1976", "BEN-1981", "BEN-1986", "BEN-1991", "BEN-1996", 
"BEN-2001", "BEN-2006", "BGD-1961", "BGD-1966", "BGD-1971", "BGD-1976", 
"BGD-1981", "BGD-1986", "BGD-1991", "BGD-1996", "BGD-2001", "BGD-2006", 
"BGR-1961", "BGR-1966", "BGR-1971", "BGR-1976", "BGR-1981", "BGR-1986", 
"BGR-1991", "BGR-1996", "BGR-2001", "BGR-2006", "BHR-1961", "BHR-1966", 
"BHR-1971", "BHR-1976", "BHR-1981", "BHR-1986", "BHR-1991", "BHR-1996", 
"BHR-2001", "BHR-2006")), lgdp_pc = structure(c(NA, NA, NA, NA, 
7.00262928009033, 6.99529218673706, 6.53417539596558, 6.90051984786987, 
7.15865516662598, 7.38541603088379, NA, NA, NA, 10.6491794586182, 
10.69615650177, 10.018406867981, 10.0704908370972, 10.0255823135376, 
9.95373916625977, 10.1316347122192, 8.60022068023682, 8.65194797515869, 
8.83529758453369, 8.8311882019043, 8.85401916503906, 8.78915596008301, 
8.73702239990234, 8.92235565185547, 8.89288139343262, 9.07096481323242, 
NA, NA, NA, NA, NA, NA, 6.56363916397095, 6.20834350585938, 6.52715730667114, 
7.13503837585449, NA, 9.28063583374023, 9.46360492706299, 9.52500152587891, 
9.61036205291748, 9.69009971618652, 9.75651931762695, 9.8624963760376, 
9.9943208694458, 10.0977354049683, 8.96818256378174, 9.15271186828613, 
9.38222980499268, 9.55772018432617, 9.67277145385742, 9.76892948150635, 
9.89057159423828, 9.96095561981201, 10.0814599990845, 10.1612281799316, 
4.42424869537354, 4.60615253448486, 4.85785865783691, 4.88180637359619, 
4.99203109741211, 4.99264097213745, 5.05267095565796, 4.72422027587891, 
4.69666385650635, 4.69302225112915, 8.96421718597412, 9.15429973602295, 
9.37329006195068, 9.55253601074219, 9.64679527282715, 9.71363735198975, 
9.85140705108643, 9.91110229492188, 10.0330429077148, 10.1047925949097, 
5.62822294235229, 5.69843626022339, 5.67156982421875, 5.63838481903076, 
5.78506278991699, 5.78611755371094, 5.69635629653931, 5.73845529556274, 
5.84113121032715, 5.85585737228394, 5.49890518188477, 5.5727391242981, 
5.52636432647705, 5.3795313835144, 5.43264722824097, 5.4912257194519, 
5.55287218093872, 5.67962026596069, 5.84709310531616, 6.04283237457275, 
NA, NA, NA, NA, 7.21125555038452, 7.36029720306396, 7.342613697052, 
7.23626947402954, 7.43780517578125, 7.75390672683716, NA, NA, 
NA, NA, 9.25457572937012, 9.07840728759766, 9.22368812561035, 
9.33519268035889, 9.43653678894043, 9.64009284973145), .Names = c("ALB-1961", 
"ALB-1966", "ALB-1971", "ALB-1976", "ALB-1981", "ALB-1986", "ALB-1991", 
"ALB-1996", "ALB-2001", "ALB-2006", "ARE-1961", "ARE-1966", "ARE-1971", 
"ARE-1976", "ARE-1981", "ARE-1986", "ARE-1991", "ARE-1996", "ARE-2001", 
"ARE-2006", "ARG-1961", "ARG-1966", "ARG-1971", "ARG-1976", "ARG-1981", 
"ARG-1986", "ARG-1991", "ARG-1996", "ARG-2001", "ARG-2006", "ARM-1961", 
"ARM-1966", "ARM-1971", "ARM-1976", "ARM-1981", "ARM-1986", "ARM-1991", 
"ARM-1996", "ARM-2001", "ARM-2006", "AUS-1961", "AUS-1966", "AUS-1971", 
"AUS-1976", "AUS-1981", "AUS-1986", "AUS-1991", "AUS-1996", "AUS-2001", 
"AUS-2006", "AUT-1961", "AUT-1966", "AUT-1971", "AUT-1976", "AUT-1981", 
"AUT-1986", "AUT-1991", "AUT-1996", "AUT-2001", "AUT-2006", "BDI-1961", 
"BDI-1966", "BDI-1971", "BDI-1976", "BDI-1981", "BDI-1986", "BDI-1991", 
"BDI-1996", "BDI-2001", "BDI-2006", "BEL-1961", "BEL-1966", "BEL-1971", 
"BEL-1976", "BEL-1981", "BEL-1986", "BEL-1991", "BEL-1996", "BEL-2001", 
"BEL-2006", "BEN-1961", "BEN-1966", "BEN-1971", "BEN-1976", "BEN-1981", 
"BEN-1986", "BEN-1991", "BEN-1996", "BEN-2001", "BEN-2006", "BGD-1961", 
"BGD-1966", "BGD-1971", "BGD-1976", "BGD-1981", "BGD-1986", "BGD-1991", 
"BGD-1996", "BGD-2001", "BGD-2006", "BGR-1961", "BGR-1966", "BGR-1971", 
"BGR-1976", "BGR-1981", "BGR-1986", "BGR-1991", "BGR-1996", "BGR-2001", 
"BGR-2006", "BHR-1961", "BHR-1966", "BHR-1971", "BHR-1976", "BHR-1981", 
"BHR-1986", "BHR-1991", "BHR-1996", "BHR-2001", "BHR-2006")), 
    lschool = structure(c(2.35911043320897, 2.41328221003299, 
    2.43590717090892, 2.52054220466727, 2.61560503855615, 2.72324801900766, 
    2.83683622695474, 2.92239366844159, 2.98478811604867, 3.01831974280998, 
    1.13164763254923, 1.37516821020743, 1.59886060402446, 1.80547476073608, 
    1.98913287448312, 2.20432184655087, 2.42784075369646, 2.65588366696786, 
    2.81063046469833, 2.86877440588403, 2.37400357050429, 2.42441204771293, 
    2.47798706926758, 2.55828772353817, 2.60388133600267, 2.70318329199619, 
    2.75915780984862, 2.81559988032215, 2.84357013976038, 2.87898832384181, 
    2.69861402431441, 2.77088423462735, 2.80632117955809, 2.85885783549437, 
    2.90995708560811, 2.95520102086794, 3.0053685417, 3.03999882510887, 
    3.07462396270553, 3.07415132254071, 2.90252699435189, 2.9280081666637, 
    2.99215965536795, 3.06980931923238, 3.14481445700899, 3.14568662948742, 
    3.15745159513512, 3.16565452292317, 3.16828962011402, 3.17444030770882, 
    2.03112275156487, 2.31962774860704, 2.50347571143773, 2.60055782875909, 
    2.6700354985435, 2.73118986769993, 2.79037936837915, 2.84235518076037, 
    2.89346188939731, 2.94574956915881, 0.371049757087941, 0.51206693783937, 
    0.627845785629485, 0.783645777671808, 0.9415377508948, 1.08388016710258, 
    1.15957326239976, 1.23771094110347, 1.36416678484992, 1.55860608884099, 
    2.58883096646545, 2.61478494877199, 2.6419320829608, 2.71831452216391, 
    2.78024406563142, 2.8332995985595, 2.93560084277246, 2.96949570689101, 
    3.00250899118587, 3.05544722221461, 0.563242558294602, 0.577648182586872, 
    0.589770022828634, 0.600824720233934, 0.610268370419734, 
    0.942916093580047, 1.27316622595578, 1.507842949318, 1.66976299411005, 
    1.78948811100657, 0.814008942248105, 0.940630166333027, 0.986379162392978, 
    1.00654720426646, 1.43249756506825, 1.61045927447873, 1.77434651166291, 
    1.91274715868216, 2.01638845451714, 2.13897075551214, 2.44272816515807, 
    2.48913484536694, 2.63313959583549, 2.70669315556332, 2.77951244261718, 
    2.84203624922508, 2.87808041892673, 2.92586417117872, 2.93660703930988, 
    2.96557257930554, 0.946515634474934, 1.08185063283973, 1.38593695739655, 
    1.71597017604808, 2.11544628015034, 2.35380472337687, 2.49719881809782, 
    2.66522232693863, 2.81655202001251, 2.8931032318686), .Names = c("ALB-1961", 
    "ALB-1966", "ALB-1971", "ALB-1976", "ALB-1981", "ALB-1986", 
    "ALB-1991", "ALB-1996", "ALB-2001", "ALB-2006", "ARE-1961", 
    "ARE-1966", "ARE-1971", "ARE-1976", "ARE-1981", "ARE-1986", 
    "ARE-1991", "ARE-1996", "ARE-2001", "ARE-2006", "ARG-1961", 
    "ARG-1966", "ARG-1971", "ARG-1976", "ARG-1981", "ARG-1986", 
    "ARG-1991", "ARG-1996", "ARG-2001", "ARG-2006", "ARM-1961", 
    "ARM-1966", "ARM-1971", "ARM-1976", "ARM-1981", "ARM-1986", 
    "ARM-1991", "ARM-1996", "ARM-2001", "ARM-2006", "AUS-1961", 
    "AUS-1966", "AUS-1971", "AUS-1976", "AUS-1981", "AUS-1986", 
    "AUS-1991", "AUS-1996", "AUS-2001", "AUS-2006", "AUT-1961", 
    "AUT-1966", "AUT-1971", "AUT-1976", "AUT-1981", "AUT-1986", 
    "AUT-1991", "AUT-1996", "AUT-2001", "AUT-2006", "BDI-1961", 
    "BDI-1966", "BDI-1971", "BDI-1976", "BDI-1981", "BDI-1986", 
    "BDI-1991", "BDI-1996", "BDI-2001", "BDI-2006", "BEL-1961", 
    "BEL-1966", "BEL-1971", "BEL-1976", "BEL-1981", "BEL-1986", 
    "BEL-1991", "BEL-1996", "BEL-2001", "BEL-2006", "BEN-1961", 
    "BEN-1966", "BEN-1971", "BEN-1976", "BEN-1981", "BEN-1986", 
    "BEN-1991", "BEN-1996", "BEN-2001", "BEN-2006", "BGD-1961", 
    "BGD-1966", "BGD-1971", "BGD-1976", "BGD-1981", "BGD-1986", 
    "BGD-1991", "BGD-1996", "BGD-2001", "BGD-2006", "BGR-1961", 
    "BGR-1966", "BGR-1971", "BGR-1976", "BGR-1981", "BGR-1986", 
    "BGR-1991", "BGR-1996", "BGR-2001", "BGR-2006", "BHR-1961", 
    "BHR-1966", "BHR-1971", "BHR-1976", "BHR-1981", "BHR-1986", 
    "BHR-1991", "BHR-1996", "BHR-2001", "BHR-2006"))), .Names = c("growth", 
"lgdp_pc", "lschool"), class = c("pdata.frame", "data.frame"), row.names = c("ALB-1961", 
"ALB-1966", "ALB-1971", "ALB-1976", "ALB-1981", "ALB-1986", "ALB-1991", 
"ALB-1996", "ALB-2001", "ALB-2006", "ARE-1961", "ARE-1966", "ARE-1971", 
"ARE-1976", "ARE-1981", "ARE-1986", "ARE-1991", "ARE-1996", "ARE-2001", 
"ARE-2006", "ARG-1961", "ARG-1966", "ARG-1971", "ARG-1976", "ARG-1981", 
"ARG-1986", "ARG-1991", "ARG-1996", "ARG-2001", "ARG-2006", "ARM-1961", 
"ARM-1966", "ARM-1971", "ARM-1976", "ARM-1981", "ARM-1986", "ARM-1991", 
"ARM-1996", "ARM-2001", "ARM-2006", "AUS-1961", "AUS-1966", "AUS-1971", 
"AUS-1976", "AUS-1981", "AUS-1986", "AUS-1991", "AUS-1996", "AUS-2001", 
"AUS-2006", "AUT-1961", "AUT-1966", "AUT-1971", "AUT-1976", "AUT-1981", 
"AUT-1986", "AUT-1991", "AUT-1996", "AUT-2001", "AUT-2006", "BDI-1961", 
"BDI-1966", "BDI-1971", "BDI-1976", "BDI-1981", "BDI-1986", "BDI-1991", 
"BDI-1996", "BDI-2001", "BDI-2006", "BEL-1961", "BEL-1966", "BEL-1971", 
"BEL-1976", "BEL-1981", "BEL-1986", "BEL-1991", "BEL-1996", "BEL-2001", 
"BEL-2006", "BEN-1961", "BEN-1966", "BEN-1971", "BEN-1976", "BEN-1981", 
"BEN-1986", "BEN-1991", "BEN-1996", "BEN-2001", "BEN-2006", "BGD-1961", 
"BGD-1966", "BGD-1971", "BGD-1976", "BGD-1981", "BGD-1986", "BGD-1991", 
"BGD-1996", "BGD-2001", "BGD-2006", "BGR-1961", "BGR-1966", "BGR-1971", 
"BGR-1976", "BGR-1981", "BGR-1986", "BGR-1991", "BGR-1996", "BGR-2001", 
"BGR-2006", "BHR-1961", "BHR-1966", "BHR-1971", "BHR-1976", "BHR-1981", 
"BHR-1986", "BHR-1991", "BHR-1996", "BHR-2001", "BHR-2006"), index = structure(list(
    wbcode = structure(c(5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 
    5L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 
    8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 
    9L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 
    13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 15L, 15L, 15L, 
    15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 
    16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 
    17L, 17L, 17L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 
    19L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 21L, 
    21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L), .Label = c("ABW", 
    "ADO", "AFG", "AGO", "ALB", "ARB", "ARE", "ARG", "ARM", "ASM", 
    "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BFA", "BGD", 
    "BGR", "BHR", "BHS", "BIH", "BLR", "BLZ", "BMU", "BOL", "BRA", 
    "BRB", "BRN", "BTN", "BWA", "CAF", "CAN", "CHE", "CHI", "CHL", 
    "CHN", "CIV", "CMR", "COG", "COL", "COM", "CPV", "CRI", "CUB", 
    "CUW", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", 
    "DZA", "EAP", "EAS", "ECA", "ECS", "ECU", "EGY", "EMU", "ERI", 
    "ESP", "EST", "ETH", "EUU", "FIN", "FJI", "FRA", "FRO", "FSM", 
    "GAB", "GBR", "GEO", "GHA", "GIB", "GIN", "GMB", "GNB", "GNQ", 
    "GRC", "GRD", "GRL", "GTM", "GUM", "GUY", "HIC", "HKG", "HND", 
    "HPC", "HRV", "HTI", "HUN", "IDN", "IMY", "IND", "IRL", "IRN", 
    "IRQ", "ISL", "ISR", "ITA", "JAM", "JOR", "JPN", "KAZ", "KEN", 
    "KGZ", "KHM", "KIR", "KNA", "KOR", "KSV", "KWT", "LAC", "LAO", 
    "LBN", "LBR", "LBY", "LCA", "LCN", "LDC", "LIC", "LIE", "LKA", 
    "LMC", "LMY", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", 
    "MCO", "MDA", "MDG", "MDV", "MEA", "MEX", "MHL", "MIC", "MKD", 
    "MLI", "MLT", "MMR", "MNA", "MNE", "MNG", "MNP", "MOZ", "MRT", 
    "MUS", "MWI", "MYS", "MYT", "NAC", "NAM", "NCL", "NER", "NGA", 
    "NIC", "NLD", "NOC", "NOR", "NPL", "NZL", "OEC", "OED", "OMN", 
    "PAK", "PAN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", 
    "PRT", "PRY", "PYF", "QAT", "ROM", "RUS", "RWA", "SAS", "SAU", 
    "SDN", "SEN", "SGP", "SLB", "SLE", "SLV", "SMR", "SOM", "SRB", 
    "SSA", "SSF", "STP", "SUR", "SVK", "SVN", "SWE", "SWZ", "SXM", 
    "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKM", "TMP", 
    "TON", "TTO", "TUN", "TUR", "TUV", "TZA", "UGA", "UKR", "UMC", 
    "URY", "USA", "UZB", "VCT", "VEN", "VIR", "VNM", "VUT", "WBG", 
    "WLD", "WSM", "YEM", "ZAF", "ZAR", "ZMB", "ZWE"), class = "factor"), 
    year = structure(c(1L, 6L, 11L, 16L, 21L, 26L, 31L, 36L, 
    41L, 46L, 1L, 6L, 11L, 16L, 21L, 26L, 31L, 36L, 41L, 46L, 
    1L, 6L, 11L, 16L, 21L, 26L, 31L, 36L, 41L, 46L, 1L, 6L, 11L, 
    16L, 21L, 26L, 31L, 36L, 41L, 46L, 1L, 6L, 11L, 16L, 21L, 
    26L, 31L, 36L, 41L, 46L, 1L, 6L, 11L, 16L, 21L, 26L, 31L, 
    36L, 41L, 46L, 1L, 6L, 11L, 16L, 21L, 26L, 31L, 36L, 41L, 
    46L, 1L, 6L, 11L, 16L, 21L, 26L, 31L, 36L, 41L, 46L, 1L, 
    6L, 11L, 16L, 21L, 26L, 31L, 36L, 41L, 46L, 1L, 6L, 11L, 
    16L, 21L, 26L, 31L, 36L, 41L, 46L, 1L, 6L, 11L, 16L, 21L, 
    26L, 31L, 36L, 41L, 46L, 1L, 6L, 11L, 16L, 21L, 26L, 31L, 
    36L, 41L, 46L), .Label = c("1961", "1962", "1963", "1964", 
    "1965", "1966", "1967", "1968", "1969", "1970", "1971", "1972", 
    "1973", "1974", "1975", "1976", "1977", "1978", "1979", "1980", 
    "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", 
    "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", 
    "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", 
    "2005", "2006", "2007", "2008", "2009", "2010"), class = "factor")), .Names = c("wbcode", 
"year"), row.names = c("201", "206", "211", "216", "221", "226", 
"231", "236", "241", "246", "301", "306", "311", "316", "321", 
"326", "331", "336", "341", "346", "351", "356", "361", "366", 
"371", "376", "381", "386", "391", "396", "401", "406", "411", 
"416", "421", "426", "431", "436", "441", "446", "551", "556", 
"561", "566", "571", "576", "581", "586", "591", "596", "601", 
"606", "611", "616", "621", "626", "631", "636", "641", "646", 
"701", "706", "711", "716", "721", "726", "731", "736", "741", 
"746", "751", "756", "761", "766", "771", "776", "781", "786", 
"791", "796", "801", "806", "811", "816", "821", "826", "831", 
"836", "841", "846", "901", "906", "911", "916", "921", "926", 
"931", "936", "941", "946", "951", "956", "961", "966", "971", 
"976", "981", "986", "991", "996", "1001", "1006", "1011", "1016", 
"1021", "1026", "1031", "1036", "1041", "1046"), class = c("pindex", 
"data.frame")))

sessionInfo()的是:

R version 3.0.1 (2013-05-16)
Platform: i386-w64-mingw32/i386 (32-bit)

我认为奇怪的行为发生在函数中的这些行周围pgmm()

data <- eval(mf, parent.frame())
index <- index(data)

生成时,对象data似乎具有正确的“索引”属性,但index(data)执行时,该属性设置为 NULL。这可能与对 的调用有关rownames(mf)

4

0 回答 0