Menu

On Dummies ...this time

Olivier_G
2005-09-21
2013-04-30
  • Olivier_G

    Olivier_G - 2005-09-21

    Ok I have read again Katerina Juselius's online class notes (soon to be published I guess) about VECs. Readers not aware of that and wanting to estimate state-of-the-art VECs should hurry to her website quick, because this is perfection.

    Anyways I learnt that getting the VEC properties right was extremely important. Indeed she doesn't do it just for exposition purposes.
    Among the important VEC properties to check is the paramount assumption of Niid errors in the VAR. Not only 'on the whole', but also for each and every equation.
    So I turned up to see how dummies should he handled. Eviews doesn't handle dummies at all but JMulti treats them very well. In JMulti you will especially find :
    - break date estimations, which is a shame to be hidden down the initial analysis / unit root tests / UR with structural break. With this you can estimate the dates of impulse and shift dummies.
    - You can create the relevant (impulse or shift) dummies very easily by right-clicking in the variables list
    - Johansen's Trace cointegration test supports breaks in the cointegrating relationship in JMulti ! Yeeeeh ! and it also handles dummies !!!
    - It helped me a lot, by greatly impoving the VAR white errors requirement. And also I discoverd that the very same model with or without dummies yields one OR two cointegrating relationships. So clearly the rank depends on the correct specification of deterministics in the VAR.

    Now that I have written all about my life, I have questions... (why am I always such a conversation whore ?)
    1- How do you know whether to include impulse or shift dummies ? In my case, the dates of impulse dummies are exactly the dates of the shift dummies (plus or minus one quarter).
    2- How do you know whether to include a dummy (impulse or shift type) in the long run part ?! In a VEC you can leave it outside the EC, or inside (that is inside the long run part). Then you can still infer the best location (or inclusion) of a dummy on the basis of LR exclusion tests. But I don't know whether this is the correct way to do it. Anyways what's with the Johansens's Trace cointegration tests ? There is no t-value reported for the dummies anywhere, so you don't know whether to include them, to include them in the short run part or to include them in the long run part.

    SO guys... who do you discriminate between a dummy that ought to be short run and a dummy that ought to be long run ?!

     
    • Nobody/Anonymous

      1- You should include impulse dummies when estimateing VAR in first differences because breaks appear as peaks or impulses and you should include shift dummies when estimateing VAR in levels because in levels breaks appear as a shift in level of some variable to a higher level.

      The date for some dummy ( impulse - for first differenced data or shift - for data in levela ) find using UR test with structural break! It helps a lot.

      2- in long part I will include shift dummy as you are testing long run which is in level form of variables and test the dummy with LR test.
      In Johansen cointegration test always use the option in which you cen set breaks. Don't include dummies, set breaks. This said Markus to me in my previous posts. You can find it in this forum.

      Manny

       
    • Olivier_G

      Olivier_G - 2005-09-21

      Another question :
      JMulti handles dummies with only a single value=1 (everything else zero, this is 'impulse dummies') OR several values=1 one after another (and this is called 'shift dummy')
      But what if I used a single dummy variable consisting of for example
      000,11,0000000,111,000... etc. ?
      This is is intended to capture all economic recessions in a single dummy variable.
      So I have imported those values and set the type of the newly created variable as 'deterministic'.
      Estimation is just fine with the recession dummy being highly significant and getting all negative signs, but maybe my method violates something in JMulti.
      Any idea anyone ?

       
    • Nobody/Anonymous

      Hmm..yes, I understand your question. Till now I have never found something like this. The usual procedure will be in this situation to create several dummies which covers all recessions and then test the significance of each dummy because some recessions are maybe insignifficant. The insignifficant dummies will be then excluded from model. With one recession dummy which includes all recessions you are covering both signifficant and insignifficant dummies.

      Manny

       
    • Olivier_G

      Olivier_G - 2005-09-22

      That's true : by putting all recessions in one single dummy, I may (or may not) cover insignificant events.
      Yet my 'recession dummy' has p-values of 8 in three equations ! If it covers insignificant events, they must be of rare occurence.

       
    • Olivier_G

      Olivier_G - 2005-09-25

      Correction :
      It appears better to detach every single dummy in my model. Besides during one recession it may happen that a sudden shift in one variable is entirely reflected in another variable, whereas this may not be the case during another recession.
      BUT as a general comment
      1- To estimate VECMs you need to have a VAR model with Niid errors (no autocorrelation, normality and independence). This should be true for the system as a whole as well as for each and every equation of the model.
      2- LM and ARCH tests assume well specified model, so that checking normality is often better to start with.
      3- The most important (and dangerous) source of non-normality is the presence of outliers in the data (levels or changes). Therefore to specify a correct VECM, one has to introduce dummies accounting for those exceptionnal events (which often have economic meaning).
      4- Cointegration tests are well known to perform poorly in small samples (say shorter than 100 observations). So assuming you have quarterly data, that makes modeling economic processes on a 25-year long basis. A lot of economic events happen during a quarter of a century !!!
      5-So that in the end chances are you will need a lot of dummies to correct for non-normality and have well behaved levels VAR residuals.

      But isn't there a problem with including many dummies in a model ?!

       
      • Nobody/Anonymous

        About Niid.

        Checking autocorrelation is not enough. I'm suspicious on crosscorrelations and regular autocorrelations. With regular autocorrelation I mean that if you see first five posite autocorrelations followed by five negative autocorrelations or some similar regularity, your model probably has a problem even if the autocorrelations are small.

        About dummies.

        If there are more than 2% dummies compared to the amount of data, I'm worried.

        >But isn't there a problem with including many dummies in a model ?!

        Yes. It implies that the model paradigm itself doesn't fit the famous true underlying process. Suspect curve fitting.

        Sometimes getting the number of lags straight helps. I've got a data set in which AIC finds 4 lags.  Residuals cry for impulse dummies. But with 6-7 lags the residuals are normal :-)

        My opinion is that you can't find dummies without having a proper model and you can't find the proper model without having the correct dummies. Modelling by human works only in benevolent cases in which the dummies are obvious and the valley of the correct model is wide.

        I've been whining about the need of automatic outlier detection. Modern ARMA-family softwares have it. Usually ARMA-models do not work with outlier detection and replacement by model predicted value.

        To me it seems that you are using your recession dummies as state variables. Consider this approach as a conceptual alternative to Manny's advice. How about having a recession state variable and then patching the rest of the model with single impulse dummies. Whichever feels less curve fitted.

        I'm not sure if it is a good idea to patch one variable with an impulse dummy and let the dummy effect leak to other variables. (Use restrictions by mouse clicks to control the effect of the dummy).

        I think that it is one of the great mysteries of statistics why dummies work so well. Even if your theoretical model is inapplicable to the true process, you can force the model to fit it reasonably well. 

        About outliers/level shifts.

        Doesn't a dummy correct the problem at the time of the outlier but not in the lags?

        Level shifts are a recognized major spoiler in statistics. I use provided HP-filter of residuals to check with my fine chi-by-eye statistics if there seems to be level shifts.

        An impulse shock might be followed by a level shift.

        Think about a case in which you are a regular customer of a nearby groceries. Your shopping trend is flat. Then you find out that the disappearance of your neighbors cat and the cheap minced meat in the groceries are related incidences.  This will cause a downward impulse on your shopping, I assume. Later you gradually start to think that it is safe to buy anything else than meat from the shop. Thus you have now an upward trend in your shopping until you reach the maximum level of your shopping.

        G.

         
    • Nobody/Anonymous

      My practical advice:
      1) By using quarterlly data you can avoid some structural breaks that apper on monthly level, i.e. you can avoid some dummies. But, be carefull with small samples. In a wide number of papers I found that the sample is small when using less then 10 years on a basis of quartarlly data ( examples are transition economies ). So, the conclusions are often only indicative and very suspicious even if model statistics are well biased.

      2) Firstly try to catch huge outliers with your dummies not all the outliers. Every time you include new dummy test it and check the model statistics. If they are acceptable stop adding dumies and proceed with other tests.

      3) Use residual tests and UR test with structural breaks to catch the outliers.

      4) no autocorrelation => first priority, then check normality and other tests ( ps. all the tests are important )

      Manny

       
    • Nobody/Anonymous

      Ad 1) "So, the conclusions are often only indicative and very suspicious even if model statistics are well biased. "

      If your model passed all the tests, in addition, you can check this by bootstrap confidence intervals. Usually if they are close to IRFs the prediction will be well and the model will well fit your data. If they are not, take it as indicative.

      Manny

       
    • Olivier_G

      Olivier_G - 2005-09-27

      Thank you so much guys !
      I'll do my best to comment on your comments (hey, isn't that what economists are supposed to do : comment on comments ?)

      TO 'G.' (now what's your name ?)
      ---------------------------------------------

      >If there are more than 2% dummies compared to the amount of data, I'm worried.
      What do you mean ? I have 4 variables and a sample stretching across 50 years with quarterly data (203 observations). So I guess that makes max 4 dummies according to your rule of thumb. At the time being I have 9. But wait : 9 dummies is a lot in itself, but that makes only 2 dummies per variable for a time span of 50 years. So in the end I don't know if 9 dummies is a lot. Besides they are really needed as long as without them, my residuals are autocorrelated. And needless to say, this is the minimum number of dummies I could find so far.

      >Suspect curve fitting
      I love that expression ! But in my case, I have estimated a model with the lag length as given by AIC, FPE and LR (all coincide). Then I looked at the residuals and it happened that this lag length was the one producing the most non-autocorrelated residuals. Then I lloked at VARCH symptoms which were absent. But the residuals were non-normal, especially because of skewness. So I checked the suared residuals which are more suitable to spot the dates at which to introduce dummies. And that's where I found out that I needed 9 dummies to correct for (most of the) outrageous peaks, without influencing the ther two misspecification tests... Do you have anything to say about my method ?
      I don't like univariate tests like inspection of autocorrelations because in a system (like VAR or VEC), events may compensate because of another variable or because of the lags.

      Yes ! outlier detection would be great in JMulti. Just another area where this software would show its superiority and gain popularity

      >To me it seems you are using recession dummies as state variables.
      I have no precise idea what a state variable is. No comment on that.

      Yup dummies are great. But thanks for the mentioning the fact that virtually every model can be estimated correctly provided you have the correct dummies. I'll try that :)

      Yeah, level shifts are very important. I have two variables which exhibit some kind of level shift when taken in DELTA LOGS. They're kind of bell-shaped and that's an I(2) symptom. But my variables can still be thought of as I(1) (borderlin case). But I don't want to correct for those 'level shifts' because I have two variables which exhibit the very same bell-shape. So that in the VAR, they cancel out or match each other in some way (or another).

      Thanks for that 'neighbor cat' example. That made me laugh (and think).

      TO MANNY
      ---------------
      You are right : don't do VEC with less than 10 years of quarterly data ! 20 years is he minimum (as used by Juselius herself), but some Monte Carlo study whose author I forgot found out that 100 observations were the absolute minimum, and that 300 observations were a lot better (but still not the panacea). This is beccause Johansen's cointegration tests have poor properties in small samples (or you have to correct the Trace statisitic by some small sample correction factor, like in Cheung & Lai)

      I found out in practice that your points 2/3/4 were exactly the best method, so far. Thanks a lot !

       
    • Nobody/Anonymous

      ==>"Yes ! outlier detection would be great in JMulti. Just another area where this software would show its superiority and gain popularity"

      It egzists! In Initial analisys under UR tests with structural break. I use it all the time to find outliers.
      The procedure is as follows:
      Select the variable ( for example in differences ) under Inital analisys, UR with structural break. Check impulse dummy and execute test to see optimal number of lags. Set the optimal number and re-estimate. Then go on Search break date. Set default renge on maximum and click on Search break date button. The suggested break date will come out. This will be your date ( outlier ) for set period i.e this will be your impulse dummy! You can look at the graph of your selected variable and you will see that this date is the exactly date of your outlier. It works for me every time. But you must set your test wright.

      ==>"TO 'G.' (now what's your name ?)"
      It will be nice, but privacy is top priority.
      Maybe is G like GOD! Ah ah....;;))
      Don't take me serious.

      Manny

       
    • Nobody/Anonymous

      ==>"You are right : don't do VEC with less than 10 years of quarterly data ! 20 years is he minimum (as used by Juselius herself), but some Monte Carlo study whose author I forgot found out that 100 observations were the absolute minimum, and that 300 observations were a lot better (but still not the panacea)."

      I said: better indicative then nothing!
      100 observations of quarterlly data is 25 years long period and 300 is 75 years period.
      In practice, where to find such a long period data? Meybe some data for US economy, but it will be such a cointegration valid? I don't think so. In such a long period many things may happen like wars, law changings, technological progress etc. Usually data for such a long period are not comparabile.

      Manny

       
    • Olivier_G

      Olivier_G - 2005-09-28

      I have nothing else to report Manny except for what I have read in the literature. For comparative purposes, and great exposition, see Maddala's "Unit root tests, cointegration and structural change".
      I know 100 or even 300 observations is hard to find. But as you said you have plenty of such time series for the US. and also for unexpected countries, like Brazil for instance. But it is not the case for European countries. I got in touch with the guy at the French statistical agency about that and he says that "well, you know we did not convert all the data to quarterly obervations, and no series is quarterly available before 1978 BECAUSE the people don't use it". I was shocked.
      In the meantime you have a result that cointegration deals with long run. How long is that long run ? Well, for pure econometric reasons, the long run happens since 80 // 100 // 300 observations.
      That's all I can say.

      Another thing about using UR tests to choose breaks. I have the strong feeling, but I have no formal proof, that this can be misleading. The reason is the following. Let's say you want to do VECM and therefore you are searching for the lag length (easier) and potential dummies to correct for outliers getting skewed residuals. So what do you do ? You choose one of your series one after another and do what you describe as UR test and search breaks. If that is what you are doing, I think you are wrong. This is because breaks or shifts or impulses in INDIVIDUAL series have nothing to do with breaks, shifts and impulses in the VAR / VEC model. In such simultaneous equations models, everything depends upn  everything else and therefore sudden events ('outliers') can well be the result of some other variable in the model. So that in the end a sudden movement in one variable may be offset by another sudden movement in another variable, or a combination of other variables. If you include a dummy right at this spot, then you introduce a bias.
      On the contrary, if you use UR tests on the RESIDUALS of the levels VAR, then fine. There is no problem with that, except for that it is unnecessary to use UR tests in that case : just estimate your levels VAR, and plot the (squared) residuals. You'll see exactly where the outliers are, and those really need be accounted for (dummy !)

      BTW I found out that you can zoom in JMulti's horrible Gauss graphs... which is clearly the only advantage of those graphs. Java graphs are way better !

      Hope that helps.

      Olivier.

       
    • Nobody/Anonymous

      Yes! You are wright! I include and use UR with structural breaks only when I have peaks in residuals!

      I just explained how UR test can be helpfull in catching the outliers as an additional tool. Belive me, it helps! In the large number of  tested cases I found that outliers in original series produces outliers in VAR/VECM residuals.

      Manny

       
    • Nobody/Anonymous

      ==>"This is because breaks or shifts or impulses in INDIVIDUAL series have nothing to do with breaks, shifts and impulses in the VAR / VEC model. In such simultaneous equations models.."

      This isn't so, they are related as I posted before. Furthermore, that's why dummies are used...to eliminate non-normality in residuals which are produced because of breaks or peaks in original series.

      You include dummy variables if you have some visible outlier in original series. This is regular procedure when estimateing econometric models.
      ( for example dummy for changes in taxes or monetary policy, new measures, crisis etc. This are all changes in original series for which you should (and test)  include dummies ) 

      Manny

       
    • Olivier_G

      Olivier_G - 2005-09-30

      I think we are getting confused in here because I'm speaking theory and you reply practice.
      In THEORY, there is no reason why the residuals of a VAR / VEC should be related to the outliers in each of the variable. This is because (1) you include past values which tend to whiten the errors - and this is why increasing the lag length works so well on LM results (2) you include other variales and their past values (3) if the model is well specified in the sense that it contains all the relevant variables, then outliers will tend to compensate in the model so as to produce smooth residuals.
      BUT
      In PRACTICE as you said, the same outliers are often found in both the VAR / VEC residuals and the UR tests.

      That is a proof that co-movements or co-ntegration does not work for each and every values. Hence the need to include dummies which generally yields more cointegration relations, or 'stronger' cointegration.

      I, btw, have found Juselius and Hendry 'introduction the cointegration part I and II' on her website. It's alsmost like a summing up of her new book I was talking about recently. I love it.
      Also I saw that Lutkepohl updated his introduction to econometrics. And what an introduction : 700+ pages. But the book hasn't come out already and it costs 150 Euros, Dollars or even Pounds... crazy.

       
    • Olivier_G

      Olivier_G - 2005-09-30

      Ok now I have another problem...

      I have a huge sample and therefore I need a lot of dummies to whiten the errors (like between 5 and 9). But when I use dummies which are obviously needed to correct for pikes in the VAR residuals, then my LM autocorrelation drops to zero.
      Why is it that when I introduce important dummies I get autocorrelation showing up ?! This is nonsense. I tried to increase the lag length but that's no real improvement.

      All those VAR specs checking is driving me crazy. When I move one cursor in the right direction the others move in the wrong directions. Or I just leave enormous pikes in the residuals and take them as empirical support as to why there isn't autocorrelation. I've been spending three full days non-stop on this and it is driving me crazy.
      I tried a different model, I tried with nominal and real variables, I tried in smaller samples, I trid with impulse dummies, I trid with shift dummies, I even tried with trend dummies. Nothing has changed. Plus of course I get differing coint ranks in all those cases.

      can someone gve me a hint at how to decrease substancially autocorrelation in the (levels VAR) residuals ?

      Olivier,
      (desperate)

      PS : also I learnt that having white errors means that agents formulate rational expectations... I'm not even sure I am personnally 'rational', therefore why should the macro model embody such a restrictive asumption ?

       
      • Nobody/Anonymous

        "Why is it that when I introduce important dummies I get autocorrelation showing up ?! This is nonsense."

        Nowadays I'm often happy when I can reveal the hidden autocorrelations.

        "can someone gve me a hint at how to decrease substancially autocorrelation in the (levels VAR) residuals ?"

        a)This applies to anything seemingly impossible: When you fail to understand how to improve something, try to gather more knowledge about it by making it worse.

        b) Prewhiten the variables with univariate methods and try to build a model based on univariate residuals

        Nonprewhitened multivariable time series have spurious correlations.

        Or just check what kind of lags univariate models require. They shouldn't differ much from the lag structure of the whole model.

        c) Build first a well behaving model using less variables or using a tame part of your data. Learn how the model looks like and try to expand it.

        d) Take a look at the peaks of the (shortest) crosscorrelations.

        e) Crack a variable with fractional differencing in Calculator. First take the normal integer difference (1) and then find by trial and error the ( -1< x <+1 ) fractional differencing parameter which minimizes the standard deviation of the result.

        Having the differencing parameter wrong creates a spurious correlation.

        f) Check what the subset restrictions see about the relationships between your variables. Does it make sense or is your model trapped in an anomaly.

        Note that a spurious correlation can work in two ways. It may increase an existing correlation or it may damp an existing correlation.

        What comes to rational expectations, they are road signs but not places. They are used in theories because they are assumed to be central descriptors of the models. That's right but the friction of the real world introduces large and *biased* errors.

        A good example on how rational expectations work or don't work in reality is Thaler's number picking game:
        http://www.ioa.agsm.edu.au/agsm/web.nsf/Content/AGSMMagazine-Fasttrading

        But having Gaussian residuals in a model is a good goal. I don't know why it works so well.

        G.

         
    • Olivier_G

      Olivier_G - 2005-10-01

      Thanks you so much G., man of great wisdom !

      But what do you mean by
      >Nowadays I'm often happy when I can reveal the hidden autocorrelations ?

      a) I've tried that. I've included all the relevant dummies (9+shifts) and guess what, it made my model worse in terms of autocorrelation. But I don't know what it teaches me besides misspecification

      b) I don't understand what you mean by "prewhitening with univariate methods". Besides, won't I be studying a different model with different outcomes ?!

      c) This may be a good point. With less variables I can manage to get a reasonably specified model. But I also learn that I run into some kind of borderline I(2) model. Yet I don't see the connection between some variables being borderline I(2) and finding substantial autocorrelation. BEing borderline I(2) afterall, is just a matter of size and type of unit root test you use.
      Also expanding the model from a tame time period sounds like a great idea !

      d) >Take a look at the peaks of the (shortest) crosscorrelations. No comprende'

      e) Fractional differencing ? Sounds a little bit too extreme for me and my supervisors may hint at me when I present my dissertation. But how's that compatible with VECMs, in the sense that they require I(1) data and then difference them exactly by factor one ?

      >What comes to rational expectations, they are road signs but not places.
      That's a good statement. But theoretically speaking, I don't believe at all in it, so "they are assumed to be central descriptors of the models" is something I don't want to rely on.
      The link you included sounds nice, will read it.

      Thanks great wizard G. !

      Olivier.

       
      • Nobody/Anonymous

        >But what do you mean by
        >>Nowadays I'm often happy when I can reveal the hidden autocorrelations ?

        Exactly it. There are much timeseries which first look like noise, but are not.

        >a) I've tried that. I've included all the relevant dummies (9+shifts) and guess what, it made my model worse in terms of autocorrelation. But I don't know what it teaches me besides misspecification

        Look at the residuals with Hodrick-Prescott filter. Do you see any structure? (Note that this very overlooked HP is unreliable near the edges of the timeseries.)

        >b) I don't understand what you mean by "prewhitening with univariate methods". Besides, won't I be studying a different model with different outcomes ?!

        Think about two almost similar independent sinusoidal waves. In a 'short' sample your multivariate statistics probably claims that the waves are related and you are fooled to build a multivariate curve fitted nonsense model. 

        That's why prewhitening of univariate timeseries is used as a preprosessing tool.

        What comes to contemporary literature, it seems that it is time to invent this prewhitening wheel again.

        You could try some other trivial transformations of your data too. Square root or Box-Cox.

        Do you allow the dummies to be multivariate? It might not be a good idea, if one variable wants a negative dummy and the other wants a positive dummy. Use restrictions.

        >d) >Take a look at the peaks of the (shortest) crosscorrelations. No comprende'

        Information criterias seem to compete which of them yields the shortest lag specification. If your model needs
        more lags, you should see it from a peak in the crosscorrelation plots. Don't mind if it is classified as 'insignificant' by statistics. Watch if it is a peak relative to other crosscorrelations.

        >e) Fractional differencing ? Sounds a little bit too extreme for me and my supervisors may hint at me when I present my dissertation. But how's that compatible with VECMs, in the sense that they require I(1) data and then difference them exactly by factor one ?

        I use it when the model building fails with other means. There are some risks: it may mask level shifts. 

        Fool JMulti like this at the moment: find the optimal differencing parameter. Then do the inverse with parameter value -1. You can use the results as input to VECM.

        With some timeseries it is obvious that they are cointegrated (you can see it by your eyes) but cointegration test fails. Often fractional cointegration works with them with a relatively small differencing parameter adjustment, about 0.1 .

        G.

         

Log in to post a comment.

MongoDB Logo MongoDB