Announcement

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

  • Issue with acf and pacf

    I am attempting to complete an arima model on the variable lCCI. When I plot the acf for this variable I get this-
    Code:
    . ac lCCI
    (note: time series has 225 gaps)
    and the acf graph looks very odd

    In addition I am also attempting to use
    Code:
    twoway (tsline D.lvixprice)
    for the variable lvixprice which does not seem to be doing anything

    This is the data I am working with

    Code:
    input float CCI int date float(lCCI ukis01 ukis02 ukis05 ukis1) int GDP double ldiffGDP float(vixprice lvixprice) double(prodindex jobclaim) float daily_policy_index byte _merge float(ldiffprodindex ldiffjobclaim)
     101.244 16071             .           .           .           .           . 7412                     .     .         . 107.180756986204  899.2  87.51 3            .             .
    101.3045 16102   .0005973233           .           .           .           .    .                     .     .         . 106.968517863459  892.1 132.39 3 -.0019821613   -.007927245
    101.3478 16131   .0004273768           .           .           .           .    .                     .     .         . 108.241952599929    881  28.91 3   .011834458   -.012520608
    101.2077 16162  -.0013833106           .           .           .           .    .                     .     .         . 107.923593915812  871.9 279.07 3   -.00294551   -.010382888
    100.9792 16192  -.0022602894           .           .           .           .    .                     .     .         . 106.331800495225  858.1  87.02 3  -.014859115   -.015954096
    100.8247 16223  -.0015312182           .           .           .           .    .                     .     .         . 106.013441811107  846.9  61.21 3  -.002998503   -.013138019
    100.7911 16253  -.0003333058           .           .           .           .    .                     .     .         . 104.952246197382  836.4  75.14 3  -.010060447   -.012475656
    100.7837 16284 -.00007342696  -.02866241  -.02866241  -.02866241  -.01244779    .                     . 13.34  2.590767 103.678811460913  834.5   76.2 3   -.01220768  -.0022742245
    100.8321 16315   .0004801298  -.04280979  -.04280979  -.04280979  -.05782462    .                     . 12.45  2.521721 103.466572338168  832.9 110.52 3 -.0020491811   -.001919156
    101.0198 16345   .0018597638   -.1807404   -.1807404   -.1807404   -.3908601    .                     . 14.02  2.640485 104.315528829148  831.5 102.59 3   .008171649  -.0016822884
      101.23 16376   .0020786687    .2073853    .2073853    .2073853    .4497527    .                     . 12.64 2.5368664  104.84612663601  829.5 111.62 3   .005073578   -.002408189
    101.3444 16406   .0011294137   .16495016   .16495016   .16495016   .18345593    .                     . 10.84  2.383243 104.209409267775  826.1 262.72 3   -.00609139   -.004107278
    101.4694 16437    .001232658   .08972668   .08972668   .09208149   .05499165 7496  .0024401894619012765 10.84  2.383243 104.209409267775  823.7 104.06 3            0   -.002909446
    101.6162 16468   .0014457434   -.3914609   -.3914609   -.4441282   -.4278553    .  .0024401894619012765 10.95 2.3933394 104.103289706403  821.7  25.42 3 -.0010188487   -.002431021
    101.6787 16496   .0006148703    .4111633    .4111633    .4111582    .3321789    .  .0024401894619012765 10.72  2.372111 101.768659356208  830.1  95.57 3  -.022681385     .01017081
    101.5694 16527  -.0010755953   .05701828   .05701828   .03994269   .11699884    .  .0024401894619012765  13.1  2.572612 105.164485320127  840.3 204.54 3    .03282346    .012212795
    101.3886 16557  -.0017815884  -.13246275  -.13246275  -.14007568  -.16593084    .  .0024401894619012765 10.84  2.383243 104.527767951892  854.1 146.94 3  -.006072893    .016289312
    101.2763 16588  -.0011082797   .01433666   .01433666  .017034333   .05348976    .  .0024401894619012765 10.07 2.3095608 105.907322249735  863.2  202.1 3   .013111635    .010598131
    101.2846 16618  .00008195838   .04890225   .04890225    .0655521   .20700794    .  .0024401894619012765 10.59 2.3599102 105.164485320127  866.7 205.74 3  -.007038742    .004046482
    101.2587 16649  -.0002557655   .22815663    .2450782   .24325976   .27845615    .  .0024401894619012765 11.65  2.455306 104.315528829148  868.2 198.26 3  -.008105414   .0017292068
    101.1367 16680   -.001205502  -.09737428  -.09235291 -.016540729  -.01622554    .  .0024401894619012765 10.27  2.329227 104.633887513265  876.1 125.32 3  .0030472344   .0090581365
    100.9505 16710   -.001842799  -.11818444  -.13430399  -.21544404  -.19293004    .  .0024401894619012765 14.73  2.689886 103.891050583658  888.2 134.32 3  -.007124712    .013716703
    100.8184 16741  -.0013094485    .1031033   .10779461   .04413927 -.013959147    .  .0024401894619012765 12.26  2.506342  104.42164839052  900.9  75.54 3   .005094254     .01419732
    100.7977 16771 -.00020532635   .13108149   .14126664   .08543718   .10501084    .  .0024401894619012765 11.63  2.453588 107.817474354439  908.1  57.15 3   .032002732    .007960241
    100.9135 16802   .0011481659    .4272834    .4272834    .4560548   .58215255 7684  .0007919922406749436 12.77 2.5470986 106.225680933852  913.5 167.96 3   -.01487385    .005928871
    100.9739 16833   .0005983724  .004493982  .004493982 -.008278321   -.0515425    .  .0007919922406749436 12.69  2.540814 106.756278740715  923.8 138.37 3   .004982571    .011212222
    100.9173 16861  -.0005607226  .065831155  .065831155   .07920563   .10486166    .  .0007919922406749436 12.44  2.520917 107.711354793067  935.8 123.44 3    .00890654     .01290618
    100.9572 16892   .0003953123  -.04363072  -.04363072  -.04833576  -.01112085    .  .0007919922406749436 12.23  2.503892 107.605235231694  945.4 103.21 3 -.0009857073     .01020634
     100.919 16922  -.0003784535  -.04848986  -.04848986  -.03035374  -.10337708    .  .0007919922406749436 21.27  3.057298 107.923593915812  950.8 383.18 3   .002954212    .005695617
    100.8689 16953  -.0004965832  -.13445634  -.13445634  -.14267825  -.08773057    .  .0007919922406749436  16.8  2.821379 108.666430845419  955.7 357.69 3    .00685941    .005140321
    100.7918 16983  -.0007646015  .016451325  .016451325   .03616007   .03555573    .  .0007919922406749436 16.48 2.8021474 107.923593915812  956.7  29.55 3   -.00685941   .0010458064
    100.7958 17014  .00003966318  -.29379946  -.29379946   -.3437546  -.41102755    .  .0007919922406749436 13.93  2.634045 108.984789529537  951.4 149.77 3   .009784814   -.005555279
    100.9065 17045   .0010976823  -.15728237  -.15728237   -.1549732   -.1775044    .  .0007919922406749436  14.2  2.653242 109.621506897771  958.1  85.19 3   .005825259    .007017573
    101.0628 17075   .0015477184  .021955494  .021955494  .003871159  -.01238086    .  .0007919922406749436 12.62  2.535283 108.984789529537  958.5 252.04 3  -.005825259   .0004174058
    100.9807 17106  -.0008126955    .1018508    .1018508   .10940805   .11931948    .  .0007919922406749436 13.52   2.60417 109.303148213654  949.2 177.84 3   .002916871   -.009750038
    100.7682 17136  -.0021065192  -.04000555  -.04000555  -.03881025 -.063112766    .  .0007919922406749436 13.05  2.568788 108.772550406792  939.9  91.03 3   -.00486619   -.009846038
    100.5193 17167   -.002473094  -.10547047  -.10358147  -.10717858   -.2404634 7767  .0036497908678221336 14.36 2.6644466 108.878669968164  925.6  66.31 3  .0009751341    -.01533131
    100.5002 17198 -.00019007115   .02508106  .025408663   .03989413 -.026341274    .  .0036497908678221336 16.87  2.825537 108.241952599929  911.5 146.42 3   -.00586512   -.015350582
    100.6272 17226   .0012628704 -.036156137  -.03874459  -.04555242  -.03805088    .  .0036497908678221336 14.89   2.70069 107.817474354439  896.8    436 3 -.0039292783   -.016258722
    100.8714 17257    .002423856  .029814754   .03746986  .014808054   .11191626    .  .0036497908678221336 15.34  2.730464 106.756278740715  878.2 172.31 3  -.009891277   -.020958513
    101.1573 17287    .002830332   .10273252   .10184152   .10865818   .08988006    .  .0036497908678221336 14.28   2.65886 108.454191722674  870.8 201.78 3    .01577942   -.008462029
     101.247 17318   .0008863329 -.015873242  -.02029616  -.02679789  -.07120682    .  .0036497908678221336 14.69  2.687167 106.437920056597  861.9  76.66 3   -.01876598   -.010273075
    101.2521 17348  .00005033539  -.09663782   -.0939766  -.08566226  -.05752233    .  .0036497908678221336  21.8   3.08191 105.058365758755  856.3   89.6 3  -.013045845   -.006518472
    101.2859 17379  .00033374695   .08125117   .08504806   .09815254   .14585699    .  .0036497908678221336 23.62  3.162094  106.54403961797  851.3 235.34 3   .014042357   -.005856189
    101.2536 17410   -.000318903  .019828314  .022578696  .013227245  .022943893    .  .0036497908678221336 20.65  3.027715   105.2706048815  844.5 269.39 3  -.012024193   -.008019856
    101.1264 17440  -.0012570143  .021669354  .022848103   .02405248  .002094137    .  .0036497908678221336 21.01 3.0449984 105.058365758755  836.3 273.07 3 -.0020181641   -.009757336
    100.8454 17471  -.0027826265 -.013106083  -.01467862 -.026475755 -.030829705    .  .0036497908678221336 23.74 3.1671615 105.058365758755  825.2 488.56 3            0    -.01336162
    100.5773 17501  -.0026620345  -.10218078  -.10546962  -.12636906   -.1889536    .  .0036497908678221336 23.24  3.145875   105.2706048815  815.2 376.92 3  .0020181641     -.0121923
    100.2755 17532   -.003005224  .008991455   .04241099   .04791455   .09844366 7903  .0012106544334922198 2
    The data I am using is monthly

  • #2
    It's the same issue as flagged to you before, if I recall correctly. Your data look like monthly data labelled by the daily dates on which data were published. You won't get sensible results without mapping to a monthly date variable using mofd() and issuing tsset in terms of that monthly date.

    Thus the first 3 dates are just for the first 3 months in 2004. Here is a display of that fact, although the use of Mata here is immaterial to what you need:


    .
    Code:
    mata : strofreal(mofd((16071, 16102, 16131)'), "%tm")
                1
        +----------+
      1 |  2004m1  |
      2 |  2004m2  |
      3 |  2004m3  |
        +----------+
    
    .
    You need to go

    Code:
    gen mdate = mofd(date)
    tsset mdate
    and try again.
    Last edited by Nick Cox; 13 Feb 2023, 07:41.

    Comment

    Working...
    X