Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Panel VAR - pvar error - no observations!

    I am hoping to see if someone can diagnose the problem with my panel data that I am trying to run a panel VAR on.

    The package is user written, talked about here infrequently, and located here: https://sites.google.com/a/hawaii.ed...love/home/pvar

    I am using Stata 14 and I get an error that there are no observations.

    Here are the basic commands to get it to run:

    xtset id year
    pvar democ tyr gdp



    The examples provided by the author work, but for some reason my own dataset is not working.




    Here is a portion of my dataset (exceeds length of post). It is unbalanced but contains no missing data.

    Thanks for your time and consideration!

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte democ float(tyr gdp population) long id int year
     0 .26444367 545.3713   8151000   1 1950
     0  .3048895 587.9284   8805000   1 1955
     0  .3769336 625.4355   9616000   1 1960
     0  .4339009 608.6725  10612000   1 1965
     0  .7172913 600.0995  11840000   1 1970
     0  .9644817 609.5523  13329000   1 1975
     0 2.0632143 510.9389  12580000   1 1990
     0  3.034217 478.1043  20536000   1 2000
     0 2.7500114 1386.831   1227156   2 1950
     0  2.925279 1635.513   1392164   2 1955
     0 3.2278206 2009.484   1610566   2 1960
     0  3.632966 2320.456   1869942   2 1965
     0 4.6331835 2774.853   2135598   2 1970
     0  5.765484 3170.867   2400800   2 1975
     0  6.951137 3250.659   2671299   2 1980
     0  7.931028 3341.464   2957395   2 1985
     3  8.610663 3461.615   3289476   2 1990
     6  8.536834 2973.519   3149959   2 1995
     6  9.931204 3796.805   3080066   2 2000
     9 10.236975 4859.125   3153731   2 2005
     0 1.1511719 4088.476  11923000   3 1965
     0 1.6901786 4304.639  13746000   3 1970
     0 2.2649062 4039.809  16018000   3 1975
     0  2.995884 5095.491  18811000   3 1980
     0 4.2767024 5491.751  22097000   3 1985
     1  5.049612  5577.95  25283000   3 1990
     1   5.76334 5323.244  28265000   3 1995
     1  6.056082 5753.122  30506000   3 2000
     3  6.429594 6431.107  32855000   3 2005
     1  .4853498 2021.066   2235000   4 1875
     3  .5854144 1896.891   2640000   4 1880
     3  .6484478 2969.535   3018000   4 1885
     3  .7040232 3197.374   3794000   4 1890
     3   .828493 4233.552   3955000   4 1895
     3   .971635 3665.702   4693000   4 1900
     3  1.454166 4890.618   5664000   4 1905
     3 1.8085947 5180.066   6836000   4 1910
     4 2.3482773 4234.161   8072000   4 1915
     4 2.9378345 4569.859   8861000   4 1920
     4  3.289994 5211.061  10358000   4 1925
     0 3.7191746 5446.784  11896000   4 1930
     0 4.0358853 5262.329  13044000   4 1935
     6  4.327889 5576.521  14169000   4 1940
     0 4.6531334 5877.405  15390000   4 1945
     0  4.907638 6702.743  17150336   4 1950
     3  5.694348 7487.299  20616010   4 1960
     3  6.028419 8599.646  22283102   4 1965
     0  6.482748 9875.114  23962314   4 1970
     6  7.034859 10469.06  26049360   4 1975
     0  7.514612 10855.09  28093512   4 1980
     8  8.086472 9139.011  30305348   4 1985
     7  8.665848 8411.165  32580860   4 1990
     7  8.907617 10513.44  34834904   4 1995
     8  9.078826 11331.96  36895712   4 2000
     8  9.572224 11858.97  38747148   4 2005
    10  3.362017 5208.375   4004000   5 1905
    10  3.866439 6359.131   4375000   5 1910
    10  4.291604 5970.538   4971000   5 1915
    10 4.7075386 5813.429   5358000   5 1920
    10  5.456175 6795.454   5943000   5 1925
    10  6.011656 5748.887   6469000   5 1930
    10   6.56063 6497.923   6732000   5 1935
    10  7.021317 7544.598   7042000   5 1940
    10   7.47982 8469.825   7389000   5 1945
    10  8.212428 9097.279   8267337   5 1950
    10  8.490238 9871.799   9277087   5 1955
    10  8.784988    10832  10276477   5 1960
    10  9.191859 12567.22  11388000   5 1965
    10 10.109424 15238.01  12507000   5 1970
    10 10.804557 15917.91  13893000   5 1975
    10 11.403393 17494.11  14692000   5 1980
    10 11.433768 18934.99  15758000   5 1985
    10 11.442933  20299.8  17065100   5 1990
    10    11.507 22582.95  18072000   5 1995
    10 11.368318 25834.54  19153000   5 2000
    10 11.705622 28558.16  20399836   5 2005
     1 2.1628969 2430.453   4520000   6 1870
     1 2.3141487 2574.857   4730000   6 1875
     1 2.4965715 2712.629   4941000   6 1880
     1  2.744033 2890.657   5166000   6 1885
     1  3.035806 3188.281   5394000   6 1890
     1   3.35952 3507.227   5680000   6 1895
     1 3.7001405 3760.406   5973000   6 1900
     1   4.03354 4031.782   6292000   6 1905
     1  4.376605 4293.535   6614000   6 1910
     1 4.7112365  3461.83   6843000   6 1915
     8  5.026175  3147.77   6455000   6 1920
     8  5.471345 4393.444   6582000   6 1925
     8  5.860645  4678.92   6684000   6 1930
     0  6.250575 3792.838   6761000   6 1935
    10  5.888529 4835.975   6935100   6 1950
    10  5.636898 6593.996   6946885   6 1955
    10  5.674177 8505.897   7048001   6 1960
    10  6.540705 10092.09   7255000   6 1965
    10  7.255645 12719.22   7426000   6 1970
    10  7.442688 15197.14   7556000   6 1975
    10    7.5957 17954.05   7553000   6 1980
    10  7.835042 19250.11   7555000   6 1985
    10  8.255956 22045.35   7710882   6 1990
    10  8.928914 23550.04   7953067   6 1995
    10  9.433746 26999.77   8011561   6 2000
    10   9.88864 28770.73   8233300   6 2005
     0  1.630782 1322.176  7.90e+07   7 1975
     0 2.3052673 1347.846  8.89e+07   7 1980
     0  2.865826 1390.786  1.01e+08   7 1985
     0   3.15101 1576.506  1.13e+08   7 1990
     6  3.722643 1613.717  1.26e+08   7 1995
     6 4.7667513 1851.156  1.39e+08   7 2000
     6  5.513999 2337.781  1.53e+08   7 2005
     7  2.423128 2591.783   5096000   8 1870
     7 2.3803415 2756.082   5303000   8 1875
     7  2.553934 2954.427   5541000   8 1880
     7  2.646406 3025.632   5876000   8 1885
     7  2.631294 3307.405   6096000   8 1890
     7  2.650415 3388.992   6439000   8 1895
     7  2.659815 3602.739   6719000   8 1900
     7  2.772319 3750.096   7175000   8 1905
     7  3.088003 3927.312   7498000   8 1910
     8 3.2578826 2447.678   7759000   8 1915
     9 3.4820135 3966.346   7552000   8 1920
     9 3.7533655 4956.444   7779000   8 1925
    10  4.268121 5549.464   8076000   8 1930
    10  4.645748 5121.084   8288000   8 1935
    10  5.930492 3272.806   8339000   8 1945
    10  6.849819 6459.167   8639369   8 1950
    10  7.168564 7473.059   8868475   8 1955
    10  7.397946 8145.514   9119000   8 1960
    10    7.5552 10051.34   9448000   8 1965
    10  7.983771 12483.77   9638000   8 1970
    10  8.391314 14644.48   9795000   8 1975
    10  8.933222 17033.01   9847000   8 1980
    10   9.41386 17832.71   9858000   8 1985
    10  9.996768 20539.78   9967400   8 1990
    10 10.639242 21861.01  10136800   8 1995
    10 10.953782 24661.91  10252000   8 2000
    10  11.10806 25946.23  10478650   8 2005
     4  .6993505 955.9087   2316078   9 1960
     0  .7864593 1017.573   2532946   9 1965
     1  .8656453 1103.571   2828008   9 1970
     0  .9613236 1163.387   3212238   9 1975
     0 1.2563342 1130.221   3709188   9 1980
     0  1.771094 1197.762   4394398   9 1985
     6  2.730227 1130.402   6208576   9 1995
     6 3.3142595 1251.474   7227219   9 2000
     6  3.853107 1338.438   8490301   9 2005
     1 2.1103904 1932.433   2850000  10 1945
     1 2.4400356 2194.921   2766028  10 1950
     1  3.146377 1836.866   3351438  10 1960
     0 3.6957104 2064.965   3747904  10 1965
     0  4.138749 2488.837   4211618  10 1970
     0  4.795129 2877.125   4758871  10 1975
     0  5.761019 2941.259   5355126  10 1980
     9  6.700286 2493.916   5964211  10 1985
     9  7.627342  2512.97   6668714  10 1990
     9  8.092877 2745.344   7481694  10 1995
     9  8.727632 2929.186   8316648  10 2000
     8  8.773056 3064.017   9182015  10 2005
     1 .13989753 639.1057   9797000  11 1870
     1 .17601302 661.3469  10749000  11 1875
     1 .21817963 624.0602  11794000  11 1880
     1 .26131228 621.4436  12941000  11 1885
     1 .29975325 639.1057  14199000  11 1890
     1  .3304795 593.9692  15980000  11 1895
     1 .56194156 513.5087  17984000  11 1900
     1  .6986775 564.9114  20003000  11 1905
     1  .8096222 635.1973  22216000  11 1910
     1  .9354333 659.0693  24674000  11 1915
     1 1.0742122 781.7881  27404000  11 1920
     1 1.1802423 857.1914  30332000  11 1925
     0  1.512133  1116.39  37150000  11 1935
     0  1.658113 1255.826  41114000  11 1940
     6 2.1094253  1767.86  53443076  11 1950
     6 2.3025827 2124.736  61773544  11 1955
     6  2.528794 2718.231  7.27e+07  11 1960
     0  2.817207  2911.93  8.43e+07  11 1965
     0  3.278618 3736.132  9.60e+07  11 1970
     2  2.869569 5385.844  1.08e+08  11 1975
     2 3.0540266 6807.063  1.22e+08  11 1980
     7  4.116255 6506.836  1.36e+08  11 1985
     8  4.939108 6372.869  1.50e+08  11 1990
     8  5.789394 6887.579  1.62e+08  11 1995
     8  6.757468 7193.598  1.74e+08  11 2000
     8  7.665623 7675.732  1.87e+08  11 2005
     1  3.506027 1251.239   5590000  12 1925
     1  3.515119 1742.389   6027000  12 1930
     0 3.5373425 1676.486   6415000  12 1935
     0  3.783334 2099.999   6666000  12 1940
     0 3.9660745 2239.727   7250500  12 1950
     0  4.823392 2913.602   7499400  12 1955
     0  5.239802 3949.921   7867006  12 1960
     0 4.7122254 5222.711   8201000  12 1965
     0  6.536314 6475.177   8490000  12 1970
     0  7.407879 7909.857   8721000  12 1975
     0  8.146046 8198.793   8862000  12 1980
     0  8.762166 8445.828   8941000  12 1985
     8  8.675454 7592.548   8718000  12 1990
     8  9.308697 7166.397   8400000  12 1995
     8   9.65443 7257.503   8060000  12 2000
     9 10.610304 9827.609   7740000  12 2005
     0  .6667263 231.8712   4840000  13 1955
     0  1.233966 300.2888   5433000  13 1960
     0  1.533279 307.8163   6141000  13 1965
     3  3.411415 436.3525  11380000  13 1995
     3 3.6400385 513.9064  12760000  13 2000
     3 4.2618165 898.1545  13866000  13 2005
     0   1.12343 1946.723   5410000  14 1960
     0 1.5053864 1986.185   6050000  14 1965
     0  1.922392 1946.957   6840000  14 1970
     0   2.58253 1990.656   7820000  14 1975
     0  3.246711 2370.161   9080000  14 1980
     0  3.939266 3542.822  1.05e+07  14 1985
     0 4.6472692 2699.339  1.22e+07  14 1990
     1  5.300442  2128.86  1.41e+07  14 1995
     1  5.762945 2471.727  1.59e+07  14 2000
     1  6.062249 2752.048  1.78e+07  14 2005
     7  2.718266 2032.014   3625000  15 1870
     7  2.851527 2139.269   3954000  15 1875
     7 2.9910545 2177.547   4255000  15 1880
     7    3.1025  2485.64   4537000  15 1885
     9  3.183235 2852.065   4779000  15 1890
     9  3.349182 2843.176   5026000  15 1895
     9    3.9863 3491.086   5301000  15 1900
     9  4.340078 4271.204   6002000  15 1905
     9  4.826528 4875.516   6988000  15 1910
     9  5.184384 5075.929   7960155  15 1915
     9  5.540967 4630.544   8556000  15 1920
    10  5.915124 5204.703   9294000  15 1925
    10  6.349238 5768.705  10208000  15 1930
    10  6.845291 4737.448  10845000  15 1935
    10  7.139615 6437.408  11369650  15 1940
    10  7.460677 8553.582  12066148  15 1945
    10  7.756176 8743.682  13712000  15 1950
    10  8.113287 9834.647  15698000  15 1955
    10  8.552488 10495.69  17909008  15 1960
    10  8.850595 12558.75  19678000  15 1965
    10  9.472797 14450.52  21324000  15 1970
    10 10.020752 17167.55  23209000  15 1975
    10 10.493711 19397.33  24593000  15 1980
    10  10.29013 21083.79  25942000  15 1985
    10 10.708694 22631.09  27791000  15 1990
    10 11.106293 23112.35  29354000  15 1995
    10  11.39111 26820.73  30769700  15 2000
    10 12.491241 28900.29  32312000  15 2005
     3 .43069795 1430.563   1956000  16 1870
     4  .5128327 1581.218   2076000  16 1875
     4  .5827108 1929.403   2144000  16 1880
     4  .6431232 1982.053   2450000  16 1885
     6  .6920903 2180.293   2627000  16 1890
     5  .7516155 2392.471   2712000  16 1895
     5  1.577997 2432.629   2974000  16 1900
     5 1.8484788 2504.927   3163000  16 1905
     5 2.3864696 3326.362   3364000  16 1910
     5  2.923919 2648.901   3584000  16 1915
     5  3.425897 3069.218   3827000  16 1920
     1  3.863786 3495.262   4086000  16 1925
     1 4.0800014 3169.647   4370000  16 1930
     3 4.3117332 3061.522   4703000  16 1935
     3 4.5851784 3588.145   5093000  16 1940
     3  4.761538 3849.005   5565000  16 1945
     3  4.911852 4068.817   6090833  16 1950
     5  5.036159 4407.703   6743269  16 1955
     5  5.234365 4734.659   7643274  16 1960
     6  5.713527 5074.891   8646618  16 1965
     6   6.18011 5800.334   9569625  16 1970
     0  6.698358 4738.003  10413214  16 1975
     0  7.131468 6298.146  11174172  16 1980
     0  7.849414 5576.506  12102169  16 1985
     8  8.582975 7097.031  13178777  16 1990
     8  8.915627  9949.03  14394935  16 1995
     9  9.405284 11430.19  15411830  16 2000
     9  9.962246 13421.63  16295102  16 2005
     1  .2573795 664.0196  4.89e+08  17 1930
     1  .3573853 660.7513  5.05e+08  17 1935
     0 1.7880176 524.1082  5.47e+08  17 1950
     0 2.1818748 674.4411  6.09e+08  17 1955
     0 2.8022494 774.5902  6.67e+08  17 1960
     0  3.399949 820.7433  7.15e+08  17 1965
     0 4.1621695 910.5377  8.18e+08  17 1970
     0  4.834566 1019.132  9.16e+08  17 1975
     0  5.744428 1241.249  9.81e+08  17 1980
     0  6.161339 1777.148  1.05e+09  17 1985
     0  6.448832 2188.666  1.14e+09  17 1990
     0  7.168479 3349.784  1.21e+09  17 1995
     0   7.78688 4001.824  1.26e+09  17 2000
     0  8.021855 6522.226  1.31e+09  17 2005
     3  .8469073 1164.888   4237880  18 1900
     1  .9952814 1260.369   4687320  18 1905
     1 1.4388037   1390.9   5183400  18 1910
     1  1.621116 1351.361   5796080  18 1915
     1 1.7907014 1502.207   6585780  18 1920
     1 2.0126762  1501.99   7484660  18 1925
     6 2.1688924 1764.465   8388840  18 1930
     6 2.3154352  2006.86   8901880  18 1935
     6 2.3994994 2268.528   9724440  18 1940
     6 2.5290475 2273.476  11097140  18 1945
     1 2.3814185 2577.007  12287157  18 1950
     1  2.734739 2840.253  14403709  18 1955
     7  3.101324 2988.751  16840974  18 1960
     7  3.469441 3218.574  19554404  18 1965
     7  3.976132 3703.857  22500496  18 1970
     8 4.4276934 4333.953  25301940  18 1975
     8  4.986852  8160.23  28355626  18 1980
     8  5.625477 5113.395  31564088  18 1985
     8  6.155782 5776.539  34874524  18 1990
     7  6.677688 6463.815  38258568  18 1995
     7   7.11993 6079.678  41682592  18 2000
     7  7.560891 6680.987  44945792  18 2005
     5   .888261     1234  15450807  19 1960
     0 1.0775564 1217.631  17660858  19 1965
     0  1.319208 1267.834  20597922  19 1970
     0 1.6482234 1254.981  23975944  19 1975
     0  2.158544 986.9885  28071016  19 1980
     0  2.868696 940.6317  32443228  19 1985
     0  3.321443  841.789  37941988  19 1990
     6 3.5256546 487.2188  45339292  19 1995
     0  3.518173 359.1472  50688720  19 2000
     0  3.630179 374.7643  58740548  19 2005
    10  2.713709 2193.965    420000  20 1920
    10  2.987533 2249.912    460000  20 1925
    10 3.1284425 2196.925    500000  20 1930
    10  3.281171 2063.532    550000  20 1935
    10  3.433733 2381.898    620000  20 1940
    10 3.6181564 2181.097    700000  20 1945
    10   3.60076 2652.431    866982  20 1950
    10   3.81611  3323.52   1031782  20 1955
    10  3.962915 3668.968   1333522  20 1960
    10 4.2198987 4224.286   1582263  20 1965
    10 4.0330677 5071.993   1821055  20 1970
    10  5.296954 5939.543   2050869  20 1975
    10  6.260201 6634.775   2347045  20 1980
    10  6.881584 5864.317   2696691  20 1985
    10   7.28237 6413.777   3075679  20 1990
    10  7.614125  7083.06   3474897  20 1995
    10   7.96106  8341.47   3928797  20 2000
    10  8.524582 9409.109   4327228  20 2005
     0  .9867982 1334.004   3557262  21 1960
     0 1.0937794 1547.823   4290207  21 1965
     0 1.3281647 1938.869   5310134  21 1970
     0  1.760487 2092.568   6592197  21 1975
     0 2.1347725 2093.849   8343753  21 1980
     0  2.463019 2221.859  10505760  21 1985
     0 2.7941904   2346.2  12780257  21 1990
     0  3.460349 2008.742  14985878  21 1995
     5  4.064773 2171.659  17049188  21 2000
     4  2.957682 3542.215   3913740  22 1930
     4 3.1607356 3226.656   4305420  22 1935
     4 3.3116276 2842.679   4657320  22 1940
     4  3.423725 4178.986   5030640  22 1945
     4  3.579645 4814.964   5900493  22 1950
     0  3.662551 4717.913   6508728  22 1955
     0 4.5500584 4678.823   7950019  22 1965
     0  5.414386 4511.863   8710428  22 1970
     0  6.484554 5657.515   9431897  22 1975
     0  7.820336 6222.689   9823291  22 1980
     0  8.636723 7175.234  10085530  22 1985
     0   9.20791 6958.116  10604907  22 1990
     0  9.581541 4545.058  10929915  22 1995
     0  9.879736 5698.618  11142065  22 2000
     0 10.359558 6897.232  11259905  22 2005
     7  6.355435 5412.982    614450  23 1970
    10  7.017087 4632.565    494450  23 1975
    10  7.887145 8422.265    512500  23 1980
    10  8.943611    10460    541500  23 1985
    10  9.852043 14685.68    579900  23 1990
    10  10.28438 17317.26    650850  23 1995
    10 10.819509 20456.78    694000  23 2000
    10  10.19335  22997.4    757800  23 2005
     7  4.789936 2333.688   9085300  24 1920
     7  5.126783 3145.855   9475900  24 1925
     7  5.402381 3531.942   9774800  24 1930
     7  5.701871  2909.15  10037300  24 1935
     0  6.607654 4225.854   8671998  24 1950
     0  6.782082 4734.372   9164799  24 1955
     0  6.944181 6166.595   9554000  24 1960
     0   7.65082 6678.895   9774000  24 1965
     0  8.448603 7805.953   9775000  24 1970
     0  9.066579 8932.227  10060000  24 1975
     0  9.502623 9635.627  10232000  24 1980
     0  9.855578 10100.55  10335000  24 1985
     8  10.44392 10276.18  10363000  24 1990
    10 12.229157 12519.39  10331000  24 1995
    10 12.775574 13616.58  10273300  24 2000
    10   12.8131 16007.03  10234092  24 2005
     1  2.453115 2604.031   1888000  25 1870
     1 2.5038536 2749.251   1973000  25 1875
     1  2.559069 2841.454   2081000  25 1880
     1  2.629716 2960.239   2186000  25 1885
     1  2.707318 3290.989   2294000  25 1890
     1 2.7791595 3615.853   2397000  25 1895
     1  2.844924 3940.489   2561000  25 1900
    10 3.3947175 4949.868   3055000  25 1915
    10  3.637568 5231.517   3242000  25 1920
    10  3.930927 5739.283   3425000  25 1925
    10 4.2619705 7012.111   3542000  25 1930
    10   4.59076 7192.983   3695000  25 1935
    10  5.338165 6648.675   4045000  25 1945
    10   5.62619 8930.045   4271000  25 1950
    10  4.777784 9664.983   4439000  25 1955
    10  5.297334 11613.35   4581000  25 1960
    10  6.064053 14473.71   4758000  25 1965
    10  7.190203 17045.37   4929000  25 1970
    10  8.010402 18103.86   5060000  25 1975
    10  8.846831 20054.14   5123000  25 1980
    10   9.59411 22144.44   5114000  25 1985
    10 10.480417  23088.2   5140000  25 1990
    10 11.039795 24992.23   5228000  25 1995
    10  11.50269 27827.28   5337344  25 2000
    10 11.808928 29399.68   5415978  25 2005
     0 2.5318694 1833.551   2447087  26 1950
     0 2.5826185 2111.734   2846747  26 1955
     0 2.7846425 2325.885   3348958  26 1960
     1 3.7353516  2788.34   4595872  26 1970
     1 4.3039665 3770.215   5264042  26 1975
     6  4.979207 4235.106   5933569  26 1980
     6  5.577786  4092.67   6607910  26 1985
     6    6.1292 4412.729   7294812  26 1990
     5  6.580035 4812.481   8013383  26 1995
     8  7.027327 6497.367   8743983  26 2000
     8  7.537446 7716.022   9469601  26 2005
     1 2.2316256 1817.722   2466000  27 1940
     1    2.4323 1934.776   2781000  27 1945
     4 2.6192055  2497.19   3369955  27 1950
     4 2.9311736   2816.7   3842399  27 1955
     4  3.290376 3067.672   4438762  27 1960
     1   3.99815 3439.305   5144209  27 1965
     4  4.551838  3814.03   5969919  27 1970
     0  5.066695 4637.202   6907194  27 1975
     9   6.34761 5535.148   7961410  27 1980
     8  6.761747 5409.677   9098797  27 1985
     9  7.234876 5231.263  10271884  27 1990
     9  7.315329 5694.403  11396394  27 1995
     6  7.414826 4314.442  12305544  27 2000
     6  7.699608 4885.689  13060993  27 2005
     5  .5417083 1180.487  21514000  28 1950
     0  .6995235 1154.635  24378000  28 1955
     0  .8508295 1283.179  27798000  28 1960
     0 1.1149985 1636.023  31573000  28 1965
     0 1.4149054 1726.087  35575000  28 1970
     0  1.824842 1841.632  39599000  28 1975
     0   2.79775 2653.395  44433000  28 1980
     0  3.923683 3265.335  50655000  28 1985
     0  4.601893  3585.03  57785000  28 1990
     0  5.357841 3851.906  63858000  28 1995
     0  6.301204 4535.832  70174000  28 2000
     1  6.933061 4951.233  77154000  28 2005
     0 1.2808045 1625.865   1170000  29 1920
     0  1.351829 1613.496   1300000  29 1925
     0   1.41007 1822.299   1440000  29 1930
     0  1.411009 1780.063   1530000  29 1935
     0 1.4134626 1937.209   1630000  29 1940
     0 1.5356864 1901.922   1740000  29 1945
     0 1.5471222 2595.887   1939800  29 1950
     0  1.695278 2832.281   2221139  29 1955
     1 1.9845976 3075.086   2578374  29 1960
     3 2.4140835     3663   3012155  29 1965
     3  2.904115 3812.882   3598235  29 1970
     2 3.3694365 4365.435   4119533  29 1975
     6   4.57145 3670.462   4769072  29 1985
     6  5.080717 3694.113   5110176  29 1990
     7  5.802287 4469.352   5631837  29 1995
     7  7.039048 4732.127   6195276  29 2000
     7  8.082531 4784.496   6668356  29 2005
     9  5.672379 3148.087    520304  30 1970
     9  6.395451 3927.666    575995  30 1975
     9  7.164056 4549.236    633670  30 1980
     9  7.849076 4492.224    708712  30 1985
     6  9.239808 5182.329    723560  30 1990
     6 10.280713 4752.892    767936  30 1995
     7  9.757472 5153.927    828046  30 2005
    10 2.3546095 2087.055   3133000  31 1920
    10 2.7433386 2638.923   3304000  31 1925
     7   3.40435 3514.006   3576000  31 1935
     7 3.5201726 3657.287   3698000  31 1940
    10  3.677979 3912.708   3758000  31 1945
    10   3.90772 4835.305   4008900  31 1950
    10 4.0628877 5921.924   4234900  31 1955
    10  4.249583 7113.655   4430001  31 1960
    10   4.97263 8776.289   4564000  31 1965
    10  5.989813 10957.43   4606000  31 1970
    10   7.10593 13111.85   4711000  31 1975
    10  8.039859    15008   4780000  31 1980
    10  8.012054 16736.48   4902000  31 1985
    10  8.561492 19396.65   4986000  31 1990
    10  9.306791 18230.04   5108000  31 1995
    10  9.899797 22740.69   5176198  31 2000
    10   10.4198 25510.59   5246100  31 2005
     7 1.2101353 2698.657  39045000  32 1880
     7 1.5587856 2607.852  39733000  32 1885
     7  1.796836 2758.171  40014000  32 1890
     7 2.0857437  2940.98  40098000  32 1895
     8 2.3498273 3265.618  40598000  32 1900
     8  2.653269 3302.963  40890000  32 1905
     8 2.9536996 3432.652  41224000  32 1910
     8  3.205395 2993.208  40481000  32 1915
     9  3.454358 3425.885  3.90e+07  32 1920
     9  3.662424 4551.419  40610000  32 1925
    10  3.789641 5096.718  41610000  32 1930
    10  3.937011  4294.75  41940000  32 1935
     0 4.1111836 3564.572  4.10e+07  32 1940
    10  4.415778 5807.697  41828672  32 1950
    10 4.5601864  6913.47  43427668  32 1955
     6 4.3152146 8488.823  45684000  32 1960
     6  4.775472  10553.6  48758000  32 1965
     8  5.463301 13189.31  50772000  32 1970
     8  6.048525 15091.94  52699000  32 1975
     8  6.372953  17310.6  53880000  32 1980
     8  7.370451 18688.92  55170000  32 1985
     9  8.321791 21292.49  56735000  32 1990
     9  9.355841 22201.17  57844000  32 1995
     9 10.224932 25044.54  58895516  32 2000
     9 10.863352 26101.47  60873000  32 2005
     8  .5354208 870.9935    416765  33 1965
     8  .5838994 904.2735    481577  33 1970
     8  .7510723 994.4789    569883  33 1975
     8  .9969053 876.8552    670884  33 1980
     7  1.316991 899.8627    794870  33 1985
     8 1.8485656 910.6042    962473  33 1990
     0 2.3321056 772.2025   1159255  33 1995
     0   2.77074 953.8588   1384126  33 2000
     0  3.386581 993.5243   1617029  33 2005
     0  2.443294 2794.537  40897000  34 1875
     1 2.6664634 2634.533  4.35e+07  34 1880
     1  2.885017 2931.971  45084000  34 1885
     4  3.102614 3211.871  47607000  34 1890
     4  3.310878 3553.557  50363000  34 1895
     4  3.480555  3948.69  54388000  34 1900
     4  3.615549   4106.5  58644000  34 1905
     5   3.74386 4428.773  62884000  34 1910
     5 4.4182982 3835.251  66230000  34 1915
     6  5.070916 3698.436  60894000  34 1920
     6  5.552297 4672.237  63166000  34 1925
     6  5.569866 5256.557  65084000  34 1930
     0  5.940209  5450.31  66871000  34 1935
     0  6.244315  7147.25  69835000  34 1940
    10  8.955507 21073.08  79433000  34 1990
    10   9.92925 22885.49  81642000  34 1995
    10 10.594284 25061.34  82210000  34 2000
    10  11.97793 25709.75  82469400  34 2005
     0 1.1047484 411.8636   7130000  35 1960
     0 2.0321736 332.0873   8190000  35 1965
     5 3.3509865 1051.985   9060000  35 1970
     0  4.226731 1084.792  1.03e+07  35 1975
     6   4.93033 1141.609  1.14e+07  35 1980
     0  5.626206 1013.865  1.35e+07  35 1985
     0  6.049953 1152.812  1.56e+07  35 1990
     1  6.266875 1223.777  1.79e+07  35 1995
     3  6.667969 1392.201  2.01e+07  35 2000
     8  7.350038 1541.429  2.25e+07  35 2005
     9   .783079 1772.355   3657000  36 1870
     9  .8928349 1764.116   3848000  36 1875
    10 1.0192958 1854.782   4049000  36 1880
    10 1.1447817 2320.102   4260000  36 1885
    10 1.2649904 2064.389   4482000  36 1890
    10 1.3663298 1965.446   4716000  36 1895
    10 1.6350962 1804.011   4962000  36 1900
    10 1.8029084 2341.624   5138000  36 1905
    10 2.0318143 2369.798   5320000  36 1910
     3  2.285163 2070.653   5502000  36 1915
     3  2.417735 2400.203   5700000  36 1920
     0 2.6067314 2266.899   5958000  36 1925
    10  2.984985 2615.035   6351000  36 1930
     8  3.559925 2950.524   6793000  36 1935
     0  3.940458 2916.226   7280000  36 1940
     8  4.357671 1223.174   7322000  36 1945
     7 4.3926635  2695.43   7566028  36 1950
     7   5.78561 3433.518   7965538  36 1955
     7  7.776599 4126.276   8327000  36 1960
     7   6.67802 5926.089   8550000  36 1965
     0  6.835035 8173.334   8793000  36 1970
     8  7.153685 10165.91   9047000  36 1975
     8  7.580521 11720.47   9643000  36 1980
     8  8.373777 11451.55   9934000  36 1985
    10  9.339049 11908.91  10161000  36 1990
    10  9.543065 12107.97  10634000  36 1995
    10  9.896319 13982.39  10917500  36 2000
    10 10.950247 17060.47  11104000  36 2005
     0  1.309365 1250.441   1660880  37 1920
     4 1.2821842 1434.983   1749280  37 1925
     4 1.2932485 1745.205   1841840  37 1930
     0  1.415495 1682.592   2059200  37 1935
     0  1.425507 2694.977   2288000  37 1940
     6 1.4082955 1702.096   2537600  37 1945
     4 1.3163842 2048.936   3087735  37 1950
     0  1.354397 1954.233 3571242.5  37 1955
     0   1.40802 2155.345   4139998  37 1960
     0 1.5068127 2404.701   4736430  37 1965
     3 1.7774926 2868.354   5418939  37 1970
     1 2.1055744     3353   6204241  37 1975
     0  2.944351 3935.741   7013435  37 1980
     4  3.660917 3184.137   8907610  37 1990
     4 3.9600456 3520.486  10003737  37 1995
     8  4.353157 3859.467  11229405  37 2000
     8  4.330676  3980.38  12709564  37 2005
     0  6.647005 3153.762    760860  38 1980
     0  7.044559 2542.401    753790  38 1985
     0   7.27462 2328.074    730620  38 1990
     6  7.917356 3243.326    738966  38 1995
     6  8.427638 3733.182    734397  38 2000
     6   8.79376 3829.575    739472  38 2005
    end
    label values id id

  • #2
    The pvar command is now also available through SSC, as search pvar shows.

    Your data is on five-year intervals, but your xtset command allows Stata to think it is on yearly intervals. Try
    Code:
    xtset id year, delta(5)
    pvar democ tyr gdp
    Last edited by William Lisowski; 30 Mar 2017, 10:28. Reason: Reread the question and saw the user's code (missed originally since it was not in a CODE block)

    Comment


    • #3
      Originally posted by William Lisowski View Post
      The pvar command is now also available through SSC, as search pvar shows.

      Your data is on five-year intervals, but your xtset command allows Stata to think it is on yearly intervals. Try
      Code:
      xtset id year, delta(5)
      pvar democ tyr gdp

      Thanks, that seemed promising but it still returns no observations r(2000).

      Comment


      • #4
        I installed the version of pvar available through the Stata Journal (not SSC as I mistakenly wrote above). The viewsource pvar.ado command shows me the following at the top and bottom of the file
        Code:
        /* pVAR v1.0 - 22 June 2016*/
        ...
        
        ** v1.1 2015/08/12 corrected FOD transformation in response to Tom Doan's comment
        ** v1.0 2015/07/04 first submission
        which to be the same version supplied at the link in post #1. Additionally, the bottom of help pvar shows the same author as the link you gave in post #1.
        Code:
        Authors
        
            Michael R. M. Abrigo
            Philippine Institute for Development Studies
            [email protected]
        
            Inessa Love
            University of Hawaii at Manoa
            [email protected]
        
        
        Also see
        
            Article:  Stata Journal, volume 16, number 3: st0455
        
               Help:  pvarirf, pvarfevd, pvargranger, pvarsoc, pvarstable
        Having installed pvar, I next loaded your sample data from post #1, and ran the following.
        Code:
        . xtset id year, delta(5)
               panel variable:  id (unbalanced)
                time variable:  year, 1870 to 2005, but with gaps
                        delta:  5 units
        
        . pvar democ tyr gdp
        
        Panel vector autoregresssion
        
        
        
        GMM Estimation
        
        Final GMM Criterion Q(b) =  3.73e-32
        Initial weight matrix: Identity
        GMM weight matrix:     Robust
                                                           No. of obs      =       500
                                                           No. of panels   =        38
                                                           Ave. no. of T   =    13.158
        
        
        ------------------------------------------------------------------------------
                     |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        democ        |
               democ |
                 L1. |    .735148    .087405     8.41   0.000     .5638373    .9064588
                     |
                 tyr |
                 L1. |   .6936714      .3001     2.31   0.021     .1054862    1.281856
                     |
                 gdp |
                 L1. |  -.0002477   .0001278    -1.94   0.053    -.0004982    2.90e-06
        -------------+----------------------------------------------------------------
        tyr          |
               democ |
                 L1. |  -.0329465   .0143809    -2.29   0.022    -.0611325   -.0047605
                     |
                 tyr |
                 L1. |   1.072711   .0763325    14.05   0.000     .9231017     1.22232
                     |
                 gdp |
                 L1. |  -.0000174   .0000349    -0.50   0.617    -.0000858    .0000509
        -------------+----------------------------------------------------------------
        gdp          |
               democ |
                 L1. |  -42.95964   44.02587    -0.98   0.329    -129.2488    43.32949
                     |
                 tyr |
                 L1. |   484.6666   219.5423     2.21   0.027     54.37164    914.9616
                     |
                 gdp |
                 L1. |   .8726531   .1026925     8.50   0.000     .6713796    1.073927
        ------------------------------------------------------------------------------
        Instruments : l(1/1).(democ tyr gdp) 
        
        .

        Comment


        • #5
          Wow, thanks! I installed the pvar manually which I suppose I did wrong. Do you mind sharing how you installed your version through Stata journal?

          Last edited by John Brown; 30 Mar 2017, 11:34.

          Comment


          • #6
            Start with the search pvar command I mentioned in post #1, click on the link (st0455) in the first item shown, and in the page that shows up, click on "click here to install".

            But first ... did you actually try running your sample data - not the full dataset - with your current installation? Perhaps you will get the same results I did using the sample data, suggesting that the problem lies elsewhere in your data, rather than in your installation, which ran the author's examples.

            Comment


            • #7
              I did try the sample just in case. I still get:

              . pvar democ tyr gdp
              no observations
              r(2000);


              Edit - I think it may be a stata 14 vs 13 problem!
              Last edited by John Brown; 30 Mar 2017, 11:52.

              Comment


              • #8
                And in #7, did your xtset on your sample data read exactly as follows?
                Code:
                . xtset id year, delta(5)
                       panel variable:  id (unbalanced)
                        time variable:  year, 1870 to 2005, but with gaps
                                delta:  5 units
                Not sure about Stata 14 v 13 issue; you are running some flavor of Stata 14, as am I.
                Code:
                . about
                
                Stata/SE 14.2 for Mac (64-bit Intel)
                Revision 07 Mar 2017
                Copyright 1985-2015 StataCorp LLC
                Beyond that, pvar.ado is versioned for Stata 11, suggesting it works on even older versions.

                And a piece of advice about posting.

                You use dataex, so I expect you are familiar with the Statalist FAQ linked to from the top of the page. But please especially note sections 9-12 on how to best pose your question. The more you help others understand your problem, the more likely others are to be able to help you solve your problem. Section 12.1 is particularly pertinent

                12.1 What to say about your commands and your problem

                Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!
                ... as I did in my example, so you could compare the results if the example worked for you. Please return the favor and show similar output from your attempts. I can't begin to count the number of times the problem has turned out to be an overlooked error in code that was not shown to the members until many posts later.

                And as the FAQ recommends, it helps to use code blocks to present data, code, and results readably by copying from Stata's Results window into a code block in the Forum editorFor example, the following:

                [code]
                // sample code
                sysuse auto, clear
                describe
                [/code]

                will be presented in the post as the following:
                Code:
                // sample code
                sysuse auto, clear
                describe

                Comment

                Working...
                X