Request Multivariate REGCRITS.SRC

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Request Multivariate REGCRITS.SRC

Unread post by ac_1 »

Hi Tom,

It would be useful to have a procedure like REGCRITS.SRC applicable to VAR's and VECM's i.e. for multivariate time series. Obviously there is VARLAGSELECT.SRC but the formulae are not completely transparent: AICC, SBC/BIC and HQ. There are AIC and SBC formulae in Enders RATS Programming Manual and Chapter 5 AETS; and others. Is this possible?

Amarjit
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Request Multivariate REGCRITS.SRC

Unread post by TomDoan »

@REGCRITS doesn't care what generated the log likelihood. While there are some specialized IC's which are strictly for single equation least squares, the main ones (SBC, HQ and AIC) can apply to multivariate models.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Request Multivariate REGCRITS.SRC

Unread post by ac_1 »

There's IC from VARLAGSELECT.

@REGCRITS: as described here https://estima.com/ratshelp/index.html? ... edure.html has 2 columns, giving different results.

In Enders
- AIC and SBC
- AIC* and SBC*

An example using ECT.RPF

Code: Select all

*===============================
* lag length selection tests

@varlagselect(lags=12,det=constant,crit=aic)
# ftbs3 ftb12 fcm7

@varlagselect(lags=12,det=constant,crit=sbc)
# ftbs3 ftb12 fcm7

@varlagselect(lags=12,det=constant,crit=gtos)
# ftbs3 ftb12 fcm7

@varlagselect(lags=12,det=constant,crit=hq)
# ftbs3 ftb12 fcm7


*===============================
system(model=ratemodel)
variables ftbs3 ftb12 fcm7
lags 1 to 6
det constant
end(system)
estimate(residuals=resids,noftests)
*
@regcrits
*
comp N = %eqnsize(1)*%nvar
comp aic =  %nobs*%logdet + 2*N
comp sbc =  %nobs*%logdet + N*log(%nobs)
comp aicstar = -2.0*%logl/%nobs + 2.0*N/%nobs
comp sbcstar = -2.0*%logl/%nobs + N*log(%nobs)/%nobs
report(use=creport,action=define,title="Information Criteria")
report(use=creport,atrow=1,atcol=1,span) "Information Criteria"
report(use=creport,atrow=2,atcol=1) "AIC" 			aic
report(use=creport,atrow=3,atcol=1) "SBC" 			sbc
report(use=creport,atrow=4,atcol=1) "AICstar" 			aicstar
report(use=creport,atrow=5,atcol=1) "SBCstar" 			sbcstar
report(use=creport,action=format,picture="*.###")
report(use=creport,action=show)
Presumably in comparing fits I use those appropriate like-with-like computations with the same sample range in all models?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Request Multivariate REGCRITS.SRC

Unread post by TomDoan »

I have no idea what you're trying to say about @REGCRITS. It gives 4 IC's for a single model. So yes, they're different. But an IC in isolation means nothing; they are used to compare different models. @REGCRITS produces exactly the same HQ and SBC for a VAR as is used by @VARLagSelect.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Request Multivariate REGCRITS.SRC

Unread post by ac_1 »

TomDoan wrote: Wed Apr 03, 2024 7:25 am I have no idea what you're trying to say about @REGCRITS. It gives 4 IC's for a single model. So yes, they're different. But an IC in isolation means nothing; they are used to compare different models. @REGCRITS produces exactly the same HQ and SBC for a VAR as is used by @VARLagSelect.

Sorry, the point regarding REGCRITS is there are two formulae for the same criteria, and a VAR generates a log likelihood hence using the first column. Correct?

These are the results from running the above code using VARLAGSELECT and REGCRITS. How are they the same?

Code: Select all

VAR Lag Selection
Lags HQ
   0 8.32307803
   1 0.66879444
   2 0.42990159
   3 0.35167603
   4 0.34400126
   5 0.36758951
   6 0.38667651
   7 0.36542928
   8 0.29156429*
   9 0.37367410
  10 0.40677616
  11 0.48205793
  12 0.54007865


VAR Lag Selection
Lags SBC/BIC
   0 8.34498385
   1 0.75641775
   2 0.58324238
   3 0.57073430*
   4 0.62877701
   5 0.71808274
   6 0.80288723
   7 0.84735747
   8 0.83920997
   9 0.98703726
  10 1.08585680
  11 1.22685605
  12 1.35059425


Information Criteria
AIC          0.142
SBC          0.898
Hannan-Quinn 0.444
(log) FPE    0.148
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Request Multivariate REGCRITS.SRC

Unread post by TomDoan »

Actually @REGCRITS includes the full count of free parameters (%NFREE), including the covariance matrix. That allows it to be used to compare (e.g.) a VAR and a multivariate GARCH model. @VARLAGSELECT doesn't include the covariance matrix parameters since those have the same count in each of the models. The value of the criterion doesn't matter---just the rankings.

I'm not sure what you're trying to do in the first place. You can't use IC's to compare a VAR with a VECM, so what is the point?
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Request Multivariate REGCRITS.SRC

Unread post by ac_1 »

TomDoan wrote: Wed Apr 03, 2024 9:43 am Actually @REGCRITS includes the full count of free parameters (%NFREE), including the covariance matrix. That allows it to be used to compare (e.g.) a VAR and a multivariate GARCH model. @VARLAGSELECT doesn't include the covariance matrix parameters since those have the same count in each of the models. The value of the criterion doesn't matter---just the rankings.

I'm not sure what you're trying to do in the first place. You can't use IC's to compare a VAR with a VECM, so what is the point?

The point is to compare e.g. VAR(1) vs. VAR(4) vs. VAR(p) using IC's, after an ESTIMATE. As you have said I cannot use IC's to compare VAR vs. VECM.

Therefore, I should use @VARLAGSELECT to choose the number of lags. And @REGCRITS IC's for comparison. Is that sensible?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Request Multivariate REGCRITS.SRC

Unread post by TomDoan »

I'm lost. @VARLAGSELECT does exactly that. What would re-doing the same calculations accomplish? (@REGCRITS would rank models exactly the same way).
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Request Multivariate REGCRITS.SRC

Unread post by ac_1 »

TomDoan wrote: Wed Apr 03, 2024 1:08 pm I'm lost. @VARLAGSELECT does exactly that. What would re-doing the same calculations accomplish? (@REGCRITS would rank models exactly the same way).

@REGCRITS(K=%NREGSYSTEM) produces exactly the same results as @VARLAGSELECT.

But what if I include other deterministic terms: (typically there's only a constant) i.e. seasonals and/or a time trend in the model, which cannot be included in VARLAGSELECT?

Similarly, for Engle & Granger, as VARLAGSELECT only allows 1 term NONE or CONSTANT in DET, and in the model DET usually includes a constant and resids{1}, the IC for VARLAGSELECT and REGCRITS will not be the same. Correct?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Request Multivariate REGCRITS.SRC

Unread post by TomDoan »

The VARLAG.RPF example has the @VARLAGSELECT deconstructed to allow you to change up the DETERMINISTICS. (That's the reason we did that).
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Request Multivariate REGCRITS.SRC

Unread post by TomDoan »

ac_1 wrote: Fri Apr 05, 2024 2:43 am Similarly, for Engle & Granger, as VARLAGSELECT only allows 1 term NONE or CONSTANT in DET, and in the model DET usually includes a constant and resids{1}, the IC for VARLAGSELECT and REGCRITS will not be the same. Correct?
Engle-Granger is a univariate estimation, and the lags on that have nothing to do with the lags in a VAR in the same variables.
Post Reply