Near VAR estimation

Questions and discussions on Vector Autoregressions
AdamElderfield
Posts: 28
Joined: Fri Nov 20, 2020 2:37 pm

Near VAR estimation

Unread post by AdamElderfield »

Hi,

I am estimating a var with lag restrictions, what I believe is called a near VAR, I'm using iterative SUR which as I understand is the correct estimation method for this problem. Interestingly, it works fine if I don't specify the iteration numbers:

Code: Select all

* Estimate with SUR
sur(model = restricted_var, cvout = restr_sig)
But when I specify the iteration numbers

Code: Select all

* Estimate with SUR
sur(model = restricted_var, cvout = restr_sig, iter = 20)
I get the following error message

Code: Select all

## REG13. Singular Regressions - Check for Collinearity among Rows 1 to 85.
I've tracked it to 11 iterations before this error pops up. I'd love to understand what is happening at iteration 12 to cause my regressors to suddenly become colinear (probably showing my lack of understanding here)

The system I am estimating is below (I can upload the data / full program if it helps?)

Code: Select all


* Estimate restricted model with SUR. To do so, we set up a near-VAR using EQUATION and GROUP commands
EQUATION usgdp_eq lgdpus_dt
# lgdpus_dt{1 to 3} rus_dt{1 to 3}
EQUATION tot_eq ltot_dt
# lgdpus_dt{1 to 3} ltot_dt{1 to 3} rus_dt{1 to 3}
EQUATION rus_eq rus_dt
# lgdpus_dt{1 to 3} rus_dt{1 to 3} 
EQUATION usq_eq lusq_dt
# lgdpus_dt{1 to 3} rus_dt{1 to 3} lusq_dt{1 to 3} 
EQUATION xgs_eq lxgs_dt
# lgdpus_dt{1 to 3} ltot_dt{1 to 3} lxgs_dt{1 to 3} 
EQUATION ausq_eq lausq_dt
# lgdpus_dt{1 to 3} ltot_dt{1 to 3} rus_dt{1 to 3} lusq_dt{1 to 3} lausq_dt{1 to 3} lgne_dt{1 to 3} lgdp_dt{1 to 3} $
   cinfl_dt{1 to 3} rcash_dt{1 to 3} lrtwi_dt{1 to 3} 
EQUATION gne_eq lgne_dt
#  ltot_dt{1 to 3} lausq_dt{1 to 3} lgne_dt{1 to 3} lgdp_dt{1 to 3} cinfl_dt{1 to 3} rcash_dt{1 to 2} lrtwi_dt{1 to 3} 
EQUATION gdp_eq lgne_dt
# lgdpus_dt{1 to 3} ltot_dt{1 to 3} lxgs_dt{1 to 3} lausq_dt{1 to 3} lgne_dt{1 to 3} lgdp_dt{1 to 3} cinfl_dt{1 to 3} rcash_dt{1 to 2} lrtwi_dt{1 to 3} 
EQUATION cinfl_eq cinfl_dt
# ltot_dt{1 to 3} lgne_dt{1 to 3} cinfl_dt{1 to 3} rcash_dt{1 to 3} lrtwi_dt{1 to 3} 
EQUATION rcash_eq rcash_dt 
# lgne_dt{1 to 3} cinfl_dt{1 to 3} rcash_dt{1 to 3} lrtwi_dt{1 to 3}
EQUATION rtwi_eq lrtwi_dt
# lgdpus_dt{1 to 3} ltot_dt{1 to 3} rus_dt{1 to 3} lusq_dt{1 to 3} lausq_dt{1 to 3} lgne_dt{1 to 3} lgdp_dt{1 to 3} $
   cinfl_dt{1 to 3} rcash_dt{1 to 3} lrtwi_dt{1 to 3} 

* put into group
GROUP restricted_var usgdp_eq tot_eq rus_eq xgs_eq ausq_eq gne_eq gdp_eq cinfl_eq rcash_eq rtwi_eq

Thanks

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

Re: Near VAR estimation

Unread post by TomDoan »

Yes, the data and whole program would help. How many observations do you have? Offhand, it doesn't seem that there's anything wrong with the structure.
AdamElderfield
Posts: 28
Joined: Fri Nov 20, 2020 2:37 pm

Re: Near VAR estimation

Unread post by AdamElderfield »

Thanks Tom - will do. Although I need re-write the program, when I closed RATS last night I was prompted to save "filename".rpf. Naturally, I clicked yes not realising that this saved over my input file with the outputs... I'll try and re-create the error and send it via email.

Cheers

Adam
AdamElderfield
Posts: 28
Joined: Fri Nov 20, 2020 2:37 pm

Re: Near VAR estimation

Unread post by AdamElderfield »

Hi Tom,

I have attached the files in this post (I mentioned I would email them, but this is easier). Also, my previous post about the input saving over the output, I think I had accidentally saved the output file with the input name - whoops.

There are 136 observations in the model.

Thanks for taking a look.

Adam
Attachments
SVAR2000data.csv
SVAR data
(37 KiB) Downloaded 823 times
SVARest22112020.RPF
SVAR program
(2.94 KiB) Downloaded 858 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Near VAR estimation

Unread post by TomDoan »

You have a typo on the dependent variable on one of these:

EQUATION gne_eq lgne_dt
# ltot_dt{1 to 3} lausq_dt{1 to 3} lgne_dt{1 to 3} lgdp_dt{1 to 3} cinfl_dt{1 to 3} rcash_dt{1 to 2} lrtwi_dt{1 to 3}
EQUATION gdp_eq lgne_dt
# lgdpus_dt{1 to 3} ltot_dt{1 to 3} lxgs_dt{1 to 3} lausq_dt{1 to 3} lgne_dt{1 to 3} lgdp_dt{1 to 3} cinfl_dt{1 to 3} rcash_dt{1 to 2} lrtwi_dt{1 to 3}

They have the same dependent variable. Because the explanatory variables are different, it takes a while before the process collapses.
AdamElderfield
Posts: 28
Joined: Fri Nov 20, 2020 2:37 pm

Re: Near VAR estimation

Unread post by AdamElderfield »

Wow - this is a little embarrassing. Thanks for picking that up Tom, appreciate it!

Hopefully I won't bother you with such silly problems in future!
Post Reply