R/ChinaCGE2012.R

#' @export
ChinaCGE2012 <-
  list(
    A = function(state) {
      alpha <- 2.285721
      beta <- c(0.00571921945379653, 0.00341123179518814, 0.805169151687454, 0.000569349978830593, 0.00565630395685361, 0.0861454541796253, 0.041668244206557, 0.00413777246701116, 0.00730057717175716, 0.00303515613905136, 0, 0.0302411226834915, 0.000194272377422948, 0.00078685932401983, 0.000856960229643203, 0.000317602380792532, 0.000313144793248613, 0.0040202829862574, 0.000457294188999536)
      biaozhongshengchanbumenshu <- 19
      teshushangpinshu <- 5
      teshubumenshu <- 2
      shengchanshuijingeyulaodongbaochouzhibi <- c(-0.0546388292990578, 0.591276558020123, 0.495974367450526, 0.527506584491606, 0.228008738512149, 1.10199418774818, 0.0671396741410387, 0.134584720601729, 0.138364059445131, 0.356622798530461, 1.41472807901058, 0.20434973507668, 0.123481771828289, 0.0219869207799679, 0.126644879324176, 0.00659645886834539, 0.0122636304355387, 0.145571168492461, 7.93984853066929e-06)
      yingyeyingyuyulaodongbaochouzhibi <- c(0, 0.660896726662984, 0.730380303305365, 0.670387453554885, 0.337269942190754, 1.0763801347756, 0.55693301213863, 0.19318867346451, 1.26488262759778, 1.75275449590008, 1.61101179553438, 0.385875371265639, 0.574471577478554, 0.356904732024932, 0.278234799284953, 0.0349012980118043, 0.066559726290652, 0.395514412900369, 0.0184702026887848)
      moxingzhongdeshengchanbumenshu <- 36
      moxingzhongdebumenshu <- 38
      moxingzhongdeshangpinshu <- 41
      jinkouliangweilingdebumenbianhao <- c(6, 11)

      resultA <- matrix(0, biaozhongshengchanbumenshu * 2 + teshushangpinshu, biaozhongshengchanbumenshu * 2 + teshubumenshu)

      Aguoneibufen <- matrix(c(
        0.308606897522948, 4.52328905440544e-05, 0.224836056235319,
        0.0099801743204192, 0.110055456486192, 0.0147464966679159,
        0.0114590407239647, 0.000843666967246204, 0.000954063416682648,
        0.0122631350593382, 1.35582837499922e-05, 0.000315338136350343,
        0.00571909072964625, 0.00138838258420625, 0.000847815851113601,
        0.000126745130442897, 7.37852148744756e-05, 3.4134494374241e-05,
        0.000389072928393729, 0.000439822227844211, 0.113780308212484,
        0.332487126927094, 0.0583900359691977, 0.54302626772912,
        0.0137891948174749, 0.0228553005491116, 0.00381215991589948,
        0.00166127467023042, 0.0341420000152447, 0.000204212474566424,
        0.0157396626012977, 0.0108028482557389, 0.000916113295164773,
        0.00419661997880964, 0.000476069195103604, 0.000240302847342917,
        0.000986085450144495, 0.000406322037998314, 0.0543785554128105,
        0.0483597649757245, 0.563176254020048, 0.0255352008192698,
        0.260578256740836, 0.0313645689226056, 0.0249029053736303,
        0.00353275598636047, 0.00165171823044043, 0.0189178680357974,
        0.000464148650645437, 0.0104318776149767, 0.00784276713323058,
        0.000668505872063331, 0.00280230253907816, 0.000190506444065411,
        0.000179014413136837, 0.000793219279143359, 0.000444095818372272,
        9.99114481460523e-05, 0.139407507672303, 0.257067195157043,
        0.315457145553038, 0.538398084052383, 0.0112805165219467,
        0.0131851344128802, 0.00184929052370108, 0.00305022259059869,
        0.0481423933190668, 0.000130965146007583, 0.00342258627212647,
        0.00394023197608815, 0.00513925910415559, 0.00208977503156526,
        0.000133390679619812, 0.000220147344486412, 0.00140657098600207,
        0.000209479291781967, 0.00743495216621813, 0.00397796114597878,
        0.493812491668988, 0.0136876097528861, 0.0756287261761975,
        0.0196443581132756, 0.0296498682944224, 0.00457818688657874,
        0.010888237491029, 0.0276105989936663, 7.75910775854785e-05,
        0.00619064800406437, 0.0356702169417439, 0.000127485651670709,
        0.00440960231697161, 0.000447764706148967, 0.000177026373152047,
        0.000966401963610176, 0.000326590999169442, 0.000184474376623979,
        3.76440824820552e-06, 0.21103531378629, 0.0108467956640052,
        0.636176125865137, 0.247115829850921, 0.0323666295666114,
        0.00513870395978926, 0.00301031659437095, 0.0390018396154708,
        0.0459559477755182, 0.0815802251953086, 0.00383922694163783,
        0.000514742838533487, 0.0070074127342273, 0.000598529868087193,
        0.00020758072579909, 0.000773935642496554, 0.000423086744187935,
        0.0120962728340892, 0.000635356996118575, 0.326914722606468,
        0.0214225677308233, 0.283251206969689, 0.0212456146354955,
        0.232207477685457, 0.0128738799228021, 0.00902190653785156,
        0.082484995797742, 0.00361644008860294, 0.0115524541838556,
        0.00145634957424787, 0.000451375182124339, 0.0176150587812642,
        0.0005973058905385, 0.000234801391235386, 0.00157434132825178,
        0.000491459663397123, 0.104509002385032, 0.000102620985102742,
        0.410619722107862, 0.012851605990931, 0.392786335224067,
        0.0605557594644899, 0.0181781725554692, 0.00171056956411766,
        0.00403877074545181, 0.0137628948987927, 0.0100400006160837,
        0.00947893975637372, 3.04234801932044e-05, 0.000264226786680897,
        0.00408821246338937, 0.000325862113225546, 4.96744930087043e-05,
        0.00186099596656353, 0.000222902780926152, 0.00195305537549074,
        0, 0.227654653645615, 0.0123798713335471, 0.142957410656557,
        0.0266994681367603, 0.0118596820972211, 0.00624999504379099,
        1.03493284709634, 0.0395372533364217, 0.0214237895337946,
        0.0417244458344787, 0.0140895371842284, 0.000500404492804831,
        0.0031182647538252, 0.000725025484007121, 3.38619578751084e-06,
        0.00293302521326622, 0.00176833713082189, 1.02904053368048e-05,
        0, 0.0572846411157644, 0.00603633765097633, 0.0474064773654737,
        0.0118974886741119, 0.0197531752230253, 0.0332020516869077,
        0.0259077265872204, 0.0613600718356408, 0.0631864877612865,
        0.0840699866329747, 0.00175842070007264, 0.00106740591867861,
        0.00586416300047239, 0.00502232636766738, 0.000275562661085659,
        0.00923104771403184, 0.000985389776698051, 0.000210208760134965,
        4.90109446808696e-05, 1.81605264125274, 0.00720093840849692,
        6.42295463665705, 0.00413727877991674, 0.0056045849293814,
        0.0044623553026424, 0.004063417072796, 0.104440396282219,
        1.38361187752077, 0.0365836490487986, 0.000220709855590099,
        0.000276917742085765, 0.00193544950265887, 0.00034305470926945,
        2.06726209724787e-06, 0.00163919989135475, 0.00132771581301924,
        0.00662972464756392, 1.89009319455551e-05, 0.405065313548954,
        0.00256834224119435, 0.269310142338116, 0.0441440142742641,
        0.0484333530160302, 0.0367752305312272, 0.00499119856544842,
        0.0674962926868713, 0.00881793647175749, 0.0522019635968334,
        0.000524583849786712, 0.00354088879035408, 0.00726507848153323,
        0.000417289933251544, 6.50076624359765e-06, 0.00142704513608172,
        0.00736672182346903, 0.00793859754999348, 0.000627880354911094,
        0.275342628481485, 0.00630596999328125, 0.00832332729211927,
        0.0298743751642537, 0.0302053399231361, 0.027971487924325,
        0.00446793839208332, 0.0377585543740908, 0.00530758224218346,
        0.0203407562955396, 0.270880791869279, 0.000262489060919381,
        0.0111298753361386, 0.00163056847775585, 6.0235499318738e-05,
        0.00205410761756242, 0.000843201648248776, 0.0646877114157884,
        0.00189548798522685, 0.826581668771273, 0.0349751889890287,
        2.27980607862018, 0.023549136290638, 0.0353926485019496,
        0.0127761512554704, 0.00957988485588807, 0.0652052915844931,
        0.00403425050393445, 0.0160794103802415, 0.00333303250805973,
        0.0160258363268891, 0.0436518609075299, 0.00277194285757473,
        0.00018294185858154, 0.00295456670795164, 0.00139131054231092,
        0.00409750314573955, 0.000790003350392646, 0.293203270777345,
        0.0209516546324854, 0.229261406166816, 0.0317745729801672,
        0.0244499742068771, 0.0123384928544908, 0.00435341791686851,
        0.0213399168807007, 0.0496722237717052, 0.0173321793524548,
        7.98483312524197e-05, 0.000968542923306525, 0.0190124364738636,
        0.000796675632036532, 0.000212591182254008, 0.00280333696476039,
        0.00139801329027901, 0.00509168478804414, 0.000898170160230931,
        0.710754883474161, 0.00772059536230375, 2.25208790695806,
        0.0106052159961952, 0.0244172029012677, 0.0177513358884109,
        0.0136492450581343, 0.0356362914189952, 0.00852384188147665,
        0.00515100334909163, 0.00735971841433444, 0.000465465010996321,
        0.0112498581446825, 0.0134944258513373, 0.000326355149228551,
        0.00335035485408844, 0.00128233313740356, 0.00293286650972334,
        0.00110389018871079, 0.503485358512057, 0.00794975809406547,
        0.385440571725958, 0.0378673238308601, 0.0136443468842084,
        0.00505235558376033, 0.0127093302323898, 0.0138534335883619,
        0.00613287360958986, 0.00114113594398853, 0.000785996965382305,
        0.000442192977866222, 0.00749162911345829, 0.00231328894611609,
        0.00469275964871419, 0.00155635815881185, 0.000568406847645401,
        0.00296655345293303, 0.000649902163976158, 0.713947141909208,
        0.00852233582375597, 1.82376939927774, 0.0494404144783277,
        0.04218853433074, 0.0256828093682994, 0.011760092560816,
        0.022008369690241, 0.0135785920638117, 0.0174513673793463,
        0.00131051078045701, 0.00137792606162987, 0.0128086339611182,
        0.00151400717327619, 0.000335570928802637, 0.0332893043085715,
        0.00101029438540035, 1.12310404558296e-05, 0.000625038272079271,
        0.50079498325685, 0.009808313857018, 1.37870701517068,
        0.0211488730306462, 0.0541138856514974, 0.0371702487088417,
        0.0267830923003035, 0.0277118367665275, 0.00986840605170787,
        0.0145661015944401, 0.000389375537565625, 0.00183536134048781,
        0.019877287962179, 0.00788356529886674, 0.00273081674491942,
        0.009430320799954, 0.00542987389625932
      ), 19, 19)
      Ajinkoubufen <- matrix(
        c(
          0.0138324809572758, 2.13619459218014e-05, 0.0260253062985319,
          4.14404379314917e-06, 0.000183042975520331, 0, 0.00066906439573971,
          4.27913829513443e-05, 2.92744847806188e-05, 9.26964435494837e-05,
          0, 2.91098162919453e-05, 5.14262171499666e-05, 5.01486377450464e-05,
          7.48439104680718e-06, 7.57980886314357e-07, 3.10067740439762e-07,
          6.55824969493723e-06, 7.61278454550443e-07, 2.66682157745066e-05,
          0.0428514564500408, 0.0384861728295924, 2.42451542800053e-05,
          0.000903155072945508, 0, 0.00133446317363728, 0.000193355436642827,
          5.09745570364582e-05, 0.000258077723336303, 0, 0.00145297581866831,
          9.71395011024998e-05, 3.30901829908104e-05, 3.70471311134361e-05,
          2.84706283539759e-06, 1.0098250851965e-06, 0.00018945628816674,
          7.95028876499259e-07, 0.00329719363289765, 0.0228386616857109,
          0.0637222259128822, 1.06029200557559e-05, 0.000433390774002447,
          0, 0.001454017638765, 0.00017918387249348, 5.06813272088628e-05,
          0.000142999247579967, 0, 0.000962998146899207, 7.0522372299396e-05,
          2.41465567127571e-05, 2.47383060913204e-05, 1.13929618295161e-06,
          7.52272588511365e-07, 0.000152400971241161, 8.68938837966726e-07,
          6.05803865475877e-06, 0.0658373940769586, 0.0297561370061763,
          0.000130012805495462, 0.000895457530829087, 0, 0.000769846639104034,
          9.3797318207543e-05, 9.35930392514808e-05, 0.000363906017755198,
          0, 0.00031594928154914, 3.54306715529384e-05, 0.000185630996833323,
          1.84482202303063e-05, 7.97723630178059e-07, 9.25125579492333e-07,
          0.000270244042250025, 4.09877068976428e-07, 0.000450811478113997,
          0.00187865488712605, 0.0571599660878049, 5.6834732959968e-06,
          0.000125784831721091, 0, 0.0017311807935792, 0.000232208864270068,
          0.000334094712306653, 0.000208707179575167, 0, 0.000571477424875116,
          0.000320747546934966, 4.60480550249817e-06, 3.89273072186289e-05,
          2.67779194073251e-06, 7.43918244527458e-07, 0.0001856745060743,
          6.39023362905877e-07, 1.11854339531435e-05, 1.77780116323606e-06,
          0.0244278376567265, 4.50388889049888e-06, 0.00105808085079327, 0,
          0.00188980561067622, 0.000260638685113721, 9.23685635417986e-05,
          0.000294813015329916, 0, 0.00753091711638887, 3.45224315755665e-05,
          1.85926072792325e-05, 6.18603875599231e-05, 3.57942114472587e-06,
          8.72316855305858e-07, 0.000148696012182162, 8.27831491864243e-07,
          0.000733446364427617, 0.000300057361554295, 0.0378411538246703,
          8.89524130421271e-06, 0.000471100165305861, 0, 0.012992801179574,
          0.000652972259473899, 0.00027682820766028, 0.000623500085389863,
          0, 0.00106644195626098, 1.3095534411318e-05, 1.6303755717592e-05,
          0.00015550309428434, 3.57210132435924e-06, 9.86706306355878e-07,
          0.000302477705471034, 9.61613172546995e-07, 0.00633680712237595,
          4.84643786377458e-05, 0.0475302058709408, 5.33634146347047e-06,
          0.000653277736866776, 0, 0.00106137750353234, 8.67612934070369e-05,
          0.000123925653843057, 0.000104033055486243, 0, 0.000875029573473143,
          2.73568749445284e-07, 9.54392078850043e-06, 3.60901258430671e-05,
          1.94877114833417e-06, 2.08747210818625e-07, 0.000357552571196276,
          4.36142101376777e-07, 0.000118421714219491, 0, 0.0263515656279448,
          5.14046421562065e-06, 0.000237765129096903, 0, 0.000692456831874918,
          0.000317004151811027, 0.031755882629511, 0.000298860181696396, 0,
          0.0038517096827625, 0.000126693496052209, 1.80747035587529e-05,
          2.75275730861235e-05, 4.3359098455921e-06, 1.42298166144303e-08,
          0.000563521214032166, 3.46001188937501e-06, 6.23949251665035e-07,
          0, 0.00663083295536406, 2.50645397292323e-06, 7.88459105342244e-05,
          0, 0.0011533379244298, 0.00168403145276895, 0.000794952761437133,
          0.000463817809033549, 0, 0.00776075451855042, 1.58117660722136e-05,
          3.85549007540562e-05, 5.17679505521213e-05, 3.00352950698929e-05,
          1.15799746355357e-06, 0.00177355830119415, 1.9280601439722e-06,
          1.27458145997942e-05, 2.3146191571141e-05, 0.210212396686915,
          2.99002834605074e-06, 0.0106825846338052, 0, 0.00032723753405521,
          0.000226333804728198, 0.000124681901826282, 0.00078945989352766,
          0, 0.00337714719641892, 1.98462893793193e-06, 1.00023204634006e-05,
          1.70858576307822e-05, 2.05158897764142e-06, 8.6872592087842e-09,
          0.000314938960851606, 2.59787142320686e-06, 0.000401987249015128,
          8.92626319556904e-06, 0.0468872699180816, 1.0664465751393e-06,
          0.00044791354618167, 0, 0.00282790094301248, 0.00186526560109645,
          0.000153149951969984, 0.000510201205040438, 0, 0.00481892100958688,
          4.71707203955577e-06, 0.000127897563152221, 6.41350220924957e-05,
          2.49554197743768e-06, 2.73181816127865e-08, 0.00027417773428137,
          1.44140756028091e-05, 0.000481349552176759, 0.00029652639983087,
          0.031871561720392, 2.61841276228775e-06, 1.38432626824844e-05, 0,
          0.00176361337659975, 0.0014187335737413, 0.000137094235218216,
          0.000285415082449308, 0, 0.00187771668170368, 0.00243576734186312,
          9.48115381007114e-06, 9.82528684837179e-05, 9.75137849988215e-06,
          2.53127746524769e-07, 0.000394655052116809, 1.64984814107555e-06,
          0.00392227981393952, 0.000895174094532028, 0.0956787868935441,
          1.45226636520429e-05, 0.00379174737503662, 0, 0.00206648720028213,
          0.000648015392615918, 0.00029394921606879, 0.000492883638746761,
          0, 0.00148433896283195, 2.9970717659515e-05, 0.000578856195447047,
          0.000385352074420006, 1.65772025848665e-05, 7.68776899528296e-07,
          0.000567659974647754, 2.72230387198347e-06, 0.000248448330051221,
          0.00037309154126892, 0.0339389733901278, 8.69970519035075e-06,
          0.000381304946584037, 0, 0.00142757213388415, 0.000625817050183102,
          0.000133580288608249, 0.000161307397407829, 0, 0.0015999858524199,
          7.1799833507859e-07, 3.49839509325132e-05, 0.000167838934759322,
          4.76440317324981e-06, 8.93372305428098e-07, 0.000538604251534483,
          2.73541878500366e-06, 0.000308729618438999, 0.000424175023100548,
          0.082271562023096, 3.20580425385068e-06, 0.00374564682919359, 0,
          0.00142565870026319, 0.000900360262270719, 0.000418813476897207,
          0.000269372999632617, 0, 0.000475504685055483, 6.61787852702211e-05,
          1.68126829628835e-05, 9.93120587039253e-05, 8.07014583626018e-05,
          1.37144282732425e-06, 0.000643702626992421, 2.5090735381967e-06,
          0.000177831660083424, 0.000521329550935512, 0.0582796233464801,
          3.30095894410847e-06, 0.000641060347097182, 0, 0.0007966588934669,
          0.000256259034648157, 0.000389973127523987, 0.000104717433052508,
          0, 0.000105341707406858, 7.06770578257035e-06, 1.59720927881665e-05,
          6.61349770579533e-05, 1.38342893297053e-05, 1.97203922652945e-05,
          0.000299022604768488, 1.11217166487997e-06, 0.000179874236864281,
          0.000306926546465097, 0.0826410735015808, 3.53870901846987e-06,
          0.00303327238980293, 0, 0.0024632817797836, 0.00130265018498058,
          0.000360846715920973, 0.000166360199796877, 0, 0.0016109884593585,
          1.17841480681183e-05, 4.97709462004241e-05, 0.000113072697584629,
          9.05430050902984e-06, 1.41017031431184e-06, 0.00639586359278586,
          1.97678967676788e-06, 6.80983795922124e-07, 0.000295184181391402,
          0.0579682060353639, 4.07268258604197e-06, 0.00229304972679167,
          0, 0.00315957287147331, 0.00188530120135969, 0.000821812485641034,
          0.000209472430993478, 0, 0.00134464085572218, 3.50127527159783e-06,
          6.62935937416751e-05, 0.000175473713853702, 4.71465198834153e-05,
          1.14757160915328e-05, 0.00181184457667344, 1.06243475361128e-05
        ),
        19, 19
      )
      laodongtouruxishuxiangliang <- c(0.592658465793436, 0.194754773093445, 0.0794143326736502, 0.0781923621348833, 0.162046744598998, 0.205090310212276, 0.178010129295939, 0.273455508816636, 0.146235203444634, 0.186802664393738, 0.0925385230820084, 0.16064258126527, 0.198966907029883, 0.243614420504346, 0.350288134821033, 0.629645973483973, 0.361176363951541, 0.274216117011671, 0.520063356748265)
      xiaofeixiangliang <- c(211936918, 1631933, 758891902, 49690402, 0, 125284831, 84081747, 117141065, 58974562, 105244788, 206682390, 22314214, 69525851, 47288829, 77502170, 207404105, 203897570, 45833581, 323858903)
      shangpinjinkoubili <- c(0.0571677643975567, 0.320774808610785, 0.103743781169251, 0.000415055253847176, 0.00166042695078506, 0, 0.0551664410174583, 0.0482722994733009, 0.0297705241881317, 0.00750224244542503, 0, 0.0845115091224714, 0.00891189084515529, 0.034861000567664, 0.00875060087426412, 0.0059448030594113, 0.00418471634761462, 0.161165088394828, 0.00195282620451706)
      duinatouziyuxiaofeizhibi <- 0.6578893
      duiwaitouziyuxiaofeizhibi <- 0.05387513


      resultA[1:(biaozhongshengchanbumenshu * 2), 1:biaozhongshengchanbumenshu] <- rbind(Aguoneibufen, Ajinkoubufen)
      resultA[1:biaozhongshengchanbumenshu, (biaozhongshengchanbumenshu + 1):(biaozhongshengchanbumenshu * 2)] <- CD_A(matrix(alpha, biaozhongshengchanbumenshu, 1), matrix(beta, biaozhongshengchanbumenshu, biaozhongshengchanbumenshu), state$p[1:biaozhongshengchanbumenshu])

      resultA[biaozhongshengchanbumenshu * 2 + 1, 1:biaozhongshengchanbumenshu] <- laodongtouruxishuxiangliang

      resultA[1:(biaozhongshengchanbumenshu * 2), biaozhongshengchanbumenshu * 2 + 1] <- xiaofeixiangliang * c(1 - shangpinjinkoubili, shangpinjinkoubili)

      resultA <- resultA[-(biaozhongshengchanbumenshu + jinkouliangweilingdebumenbianhao), -(biaozhongshengchanbumenshu + jinkouliangweilingdebumenbianhao)]


      gongzilv <- state$p[moxingzhongdeshengchanbumenshu + 1]
      shuipiaojiage <- state$p[moxingzhongdeshengchanbumenshu + 2]
      gupiaojiage <- state$p[moxingzhongdeshengchanbumenshu + 3]

      tmplaodongbaochou <- gongzilv * resultA[moxingzhongdeshengchanbumenshu + 1, 1:biaozhongshengchanbumenshu]

      resultA[moxingzhongdeshengchanbumenshu + 2, 1:biaozhongshengchanbumenshu] <- tmplaodongbaochou * shengchanshuijingeyulaodongbaochouzhibi / shuipiaojiage

      resultA[moxingzhongdeshengchanbumenshu + 3, 1:biaozhongshengchanbumenshu] <- tmplaodongbaochou * yingyeyingyuyulaodongbaochouzhibi / gupiaojiage

      resultA[1:biaozhongshengchanbumenshu, moxingzhongdebumenshu] <- CD_A(alpha, matrix(beta, biaozhongshengchanbumenshu, 1), state$p[1:biaozhongshengchanbumenshu])


      tmpxiaofeie <- sum(resultA[1:moxingzhongdeshengchanbumenshu, moxingzhongdeshengchanbumenshu + 1] * state$p[1:moxingzhongdeshengchanbumenshu])

      resultA[moxingzhongdeshangpinshu - 1, moxingzhongdebumenshu - 1] <- tmpxiaofeie * duinatouziyuxiaofeizhibi / state$p[moxingzhongdeshangpinshu - 1]

      resultA[moxingzhongdeshangpinshu, moxingzhongdebumenshu - 1] <- tmpxiaofeie * duiwaitouziyuxiaofeizhibi / state$p[moxingzhongdeshangpinshu]
      resultA
    },

    B = {
      biaozhongshengchanbumenshu <- 19
      teshushangpinshu <- 5
      teshubumenshu <- 2
      moxingzhongdeshengchanbumenshu <- 36
      moxingzhongdebumenshu <- 38
      moxingzhongdeshangpinshu <- 41
      jinkouliangweilingdebumenbianhao <- c(6, 11)
      guoneizhaiquangonggeixishuxiangliang <- c(0.401099545759085, 0.131806184389208, 0.053746052069834, 0.0529190465408162, 0.109670036626205, 0.138801071803815, 0.120473740142274, 0.185069288135168, 0.0989690978211274, 0.126424354260435, 0.0626282449601368, 0.108719726611523, 0.134656873455666, 0.164873428870774, 0.237068092115102, 0.426131960530337, 0.244437030568586, 0.185584052740987, 0.351968609574166)
      Bgudingzichandeguoneibufen <- c(0.0882561716108159, 0, 0.0277568368396929, 0, 0.098803146173774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.140959999244394, 0, 0.501760755032525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0670146743091446, 0, 0.238545216798109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.130929738968232, 0, 0.466057073163076, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0111523645729912, 0, 0.0396979206763483, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.171287441122797, 0, 0.609714218544748, 0.18735074494246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0636111294980147, 0, 0.226429969753742, 0, 0.0726047670826852, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0995018380321376, 0, 0.354186419166819, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0348206740877757, 0, 0.12394755827667, 0, 0, 0, 0.818211234132971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00761364654663068, 0, 0.0271015114945109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.72900573452845, 0, 6.154563191423, 0, 0, 0, 0, 0, 1.29983788490156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.05999843908289, 0, 0.213570248697353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00074901996361455, 0, 0.00266620902732886, 0, 0, 0, 0, 0, 0, 0, 0.11571363635982, 0, 0, 0, 0, 0, 0, 0, 0, 0.617709034447327, 0, 2.19879507077275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.056949942670452, 0, 0.202718830778665, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.614522283481341, 0, 2.18745152239473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0983725323391308, 0, 0.3501665462935, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.492356632704138, 0, 1.75259106906334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.369273161528009, 0, 1.31446354522388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
      Bgudingzichandejinkoubufen <- c(0.00535133169482011, 0, 0.0032129196389894, 0, 0.000164328261803965, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0163164539424966, 0, 0.00083452274455837, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00775710735455369, 0, 0.00039674567416243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0151554275470332, 0, 0.000775140789541581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0012909126268485, 0, 6.60251272819039e-05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0198269272062257, 0, 0.00101406970942405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00736313897735655, 0, 0.000376595733950761, 0, 0.00423920865508468, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0115175735396416, 0, 0.000589078798299472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00403057553948217, 0, 0.000206148160207647, 0, 0, 0, 0.0251059959978786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.000881297629671268, 0, 4.50749237106306e-05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.200136510960346, 0, 0.0102361990541315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00694496150088906, 0, 0.000355207593083631, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8.67008357253051e-05, 0, 4.43440833651598e-06, 0, 0, 0, 0, 0, 0, 0, 0.00104050012002877, 0, 0, 0, 0, 0, 0, 0, 0, 0.0715012845094402, 0, 0.00365701079404615, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00659209081719125, 0, 0.000337159639007856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0711324105335504, 0, 0.0036381443342234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.011386853729584, 0, 0.000582392991748498, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.056991446962705, 0, 0.00291488940570576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0427442435057442, 0, 0.00218620072291436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
      Bcunhuo <- c(0.0804764278026037, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0230444152206456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0126715335589211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00234499532032565, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0242817374213106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00968026089863429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

      result <- matrix(0, biaozhongshengchanbumenshu * 2 + teshushangpinshu, biaozhongshengchanbumenshu * 2 + teshubumenshu)
      diag(result[1:(biaozhongshengchanbumenshu * 2), 1:(biaozhongshengchanbumenshu * 2)]) <- 1

      result[(biaozhongshengchanbumenshu * 2 + 1):(biaozhongshengchanbumenshu * 2 + 3), biaozhongshengchanbumenshu * 2 + 1] <- 1

      result[1:biaozhongshengchanbumenshu, 1:biaozhongshengchanbumenshu] <- result[1:biaozhongshengchanbumenshu, 1:biaozhongshengchanbumenshu] +
        Bgudingzichandeguoneibufen +
        Bcunhuo
      result[(biaozhongshengchanbumenshu + 1):(biaozhongshengchanbumenshu * 2), 1:biaozhongshengchanbumenshu] <- Bgudingzichandejinkoubufen

      result <- result[-(biaozhongshengchanbumenshu + jinkouliangweilingdebumenbianhao), -(biaozhongshengchanbumenshu + jinkouliangweilingdebumenbianhao)]

      result[moxingzhongdeshangpinshu - 1, 1:biaozhongshengchanbumenshu] <- guoneizhaiquangonggeixishuxiangliang

      result[moxingzhongdeshangpinshu, moxingzhongdebumenshu] <- 1

      result
    },


    S0Exg = {
      biaozhongshengchanbumenshu <- 19
      teshushangpinshu <- 5
      teshubumenshu <- 2
      moxingzhongdeshengchanbumenshu <- 36
      moxingzhongdebumenshu <- 38
      moxingzhongdeshangpinshu <- 41
      jinkouliangweilingdebumenbianhao <- c(6, 11)
      laodongzhebaochou_shengchanshuijinge_yingyeyingyu <- c(2641340939, 736062253, 1273778692)

      tmp <- matrix(NA, biaozhongshengchanbumenshu * 2 + teshushangpinshu, biaozhongshengchanbumenshu * 2 + teshubumenshu)
      tmp[(biaozhongshengchanbumenshu * 2 + 1):(biaozhongshengchanbumenshu * 2 + 3), biaozhongshengchanbumenshu * 2 + 1] <- laodongzhebaochou_shengchanshuijinge_yingyeyingyu
      tmp <- tmp[-(biaozhongshengchanbumenshu + jinkouliangweilingdebumenbianhao), -(biaozhongshengchanbumenshu + jinkouliangweilingdebumenbianhao)]
      tmp
    },


    z0 = c(894213473, 535980969, 8183479570, 535172923, 1386125871, 721553392, 619666563, 233344906, 250850952, 590140255, 419085368, 344051923, 249336127, 61624086, 157224489, 220302538, 207698068, 70036569, 336382794, 51186806, 248969888, 812578974, 221872, 2284306, 32662160, 11526917, 7389509, 4433607, 27953887, 2245559, 2192016, 1364309, 1315772, 872352, 12415233, 656617, 1, 146388737),
    subject.names = c(row.names.eng <- c(
      "Agriculture, Forestry, Fishing and Hunting",
      "Mining",
      "Manufacturing",
      "Utilities",
      "Construction",
      "Wholesale and Retail Trade",
      "Transportation and Warehousing",
      "Accommodation and Food Services",
      "Information",
      "Finance and Insurance",
      "Real Estate Rental and Leasing",
      "Leasing and Business services",
      "Scientific, and Technical Services",
      "Water Conservancy, Environment and Public Facilities Management",
      "Other Services (except Public Administration)",
      "Educational Services",
      "Health Care and Social Assistance",
      "Arts, Entertainment, and Recreation",
      "Public Administration",

      "Foreign Trade: Agriculture, Forestry, Fishing and Hunting",
      "Foreign Trade: Mining",
      "Foreign Trade: Manufacturing",
      "Foreign Trade: Utilities",
      "Foreign Trade: Construction",
      "Foreign Trade: Transportation and Warehousing",
      "Foreign Trade: Accommodation and Food Services",
      "Foreign Trade: Information",
      "Foreign Trade: Finance and Insurance",
      "Foreign Trade: Leasing and Business services",
      "Foreign Trade: Scientific, and Technical Services",
      "Foreign Trade: Water Conservancy, Environment and Public Facilities Management",
      "Foreign Trade: Other Services (except Public Administration)",
      "Foreign Trade: Educational Services",
      "Foreign Trade: Health Care and Social Assistance",
      "Foreign Trade: Arts, Entertainment, and Recreation",
      "Foreign Trade: Public Administration",

      "Compensation of Employees",
      "Taxes on Production",
      "Gross Operating Surplus",

      "Domestic Bond",
      "Foreign Bond"
    )),
    sector.names = c(row.names.eng <- c(
      "Agriculture, Forestry, Fishing and Hunting",
      "Mining",
      "Manufacturing",
      "Utilities",
      "Construction",
      "Wholesale and Retail Trade",
      "Transportation and Warehousing",
      "Accommodation and Food Services",
      "Information",
      "Finance and Insurance",
      "Real Estate Rental and Leasing",
      "Leasing and Business services",
      "Scientific, and Technical Services",
      "Water Conservancy, Environment and Public Facilities Management",
      "Other Services (except Public Administration)",
      "Educational Services",
      "Health Care and Social Assistance",
      "Arts, Entertainment, and Recreation",
      "Public Administration",

      "Foreign Trade: Agriculture, Forestry, Fishing and Hunting",
      "Foreign Trade: Mining",
      "Foreign Trade: Manufacturing",
      "Foreign Trade: Utilities",
      "Foreign Trade: Construction",
      "Foreign Trade: Transportation and Warehousing",
      "Foreign Trade: Accommodation and Food Services",
      "Foreign Trade: Information",
      "Foreign Trade: Finance and Insurance",
      "Foreign Trade: Leasing and Business services",
      "Foreign Trade: Scientific, and Technical Services",
      "Foreign Trade: Water Conservancy, Environment and Public Facilities Management",
      "Foreign Trade: Other Services (except Public Administration)",
      "Foreign Trade: Educational Services",
      "Foreign Trade: Health Care and Social Assistance",
      "Foreign Trade: Arts, Entertainment, and Recreation",
      "Foreign Trade: Public Administration",

      "Consumer",
      "Rest of the World"
    ))
  ) # end of list

Try the CGE package in your browser

Any scripts or data that you put into this service are public.

CGE documentation built on March 26, 2020, 8 p.m.