Announcement

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

  • Error in VECM diagnostic test (Stability and Normality tests)

    Hello,
    I'm having an issue conducting the diagnostic tests for VECM. The problem occurs when I use trend in my VECM model.

    Here's the code I'm using:

    Code:
    vec lnfert remg lngdpc lnmort lnedex urbp lnhepc lndepr, lag(5) trend(t) rank(1)
    veclmar, mlag(5)
    vecnorm, jbera
    The error says:
    error computing temporary var estimates
    Is there a workaround to avoid this error?

    Thank you

  • #2
    The error only occurs when using the unrestricted trend declaration trend(trend).
    In this situation, a quadratic trend is used in the basic VAR model, which also means that a linear trend is used in the VEC (VAR with differenced endogenous variables and exogenous variable EC).
    In the output of vec, I see the variable _trend so I guess that because the variable _trend has not been recreated for use in the VAR estimate (with differenced variables), we get the error message.
    You can manually estimate the output of VEC and then use the varlmar and varnorm commands as shown in the code below:

    Code:
    vec lnfert remg lngdpc lnmort lnedex urbp lnhepc lndepr, lag(5) trend(t) rank(1)
    qui gen _trend = _n
    qui predict double CE, ce
    var d.(lnfert remg lngdpc lnmort lnedex urbp lnhepc lndepr), lag(4) exog(l.CE _trend)
    varlmar, mlag(5)
    varnorm, jbera
    And the code below is for illustration data:

    Code:
    webuse urates, clear
    
    *    With trend(rtrend)
    qui vec missouri indiana kentucky , trend(rt) rank(1) lags(2)
    veclmar, mlag(4)
    vecnorm, jbera
    
    tempvar ce1
    qui predict `ce1', ce
    qui var d.(missouri indiana kentucky), exog(l.`ce1') lags(1)
    varlmar, mlag(4)
    varnorm, jbera
    
    *    With trend(trend)
    vec missouri indiana kentucky , trend(t) rank(1) lags(2)
    *veclmar, mlag(4)
    
    tempvar ce2 trend
    qui gen `trend' = _n
    qui predict double `ce2', ce
    var d.(missouri indiana kentucky), exog(l.`ce2' `trend') lags(1)
    varlmar, mlag(4)
    varnorm, jbera

    Comment


    • #3
      You may also want to check for heteroscedasticity for the VEC, the commands varlmhet (after estimating var) and veclmhet (after estimating vec) will perform extended versions of the White (1980) test for systems of equations such as VARs or VECs (Doornik, 1996).
      Code:
      ssc install varlmhet
      Examples:
      Code:
      webuse urates, clear
      
      *    With trend(rtrend)
      qui vec missouri indiana kentucky , trend(rt) rank(1) lags(2)
      veclmar, mlag(4)
      vecnorm, jbera
      veclmhet, nocross
      
      tempvar ce1
      qui predict `ce1', ce
      qui var d.(missouri indiana kentucky), exog(l.`ce1') lags(1)
      varlmar, mlag(4)
      varnorm, jbera
      varlmhet, nocross

      Comment

      Working...
      X