Shrinkage IRFs with Panel Data
Shrinkage IRFs with Panel Data
I am attaching the file and the data. The data has been transformed into balanced panel using pform. Now I want to estimate to impulse responses of output due to a shock in gap in a panel of 79 countries. However, I am getting the following error message and not sure how to fix the problem.
"## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 81, Line 2 of loop/block"
Please help me resolve this issue.
"## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 81, Line 2 of loop/block"
Please help me resolve this issue.
- Attachments
-
- abc2.xls
- Data
- (111.5 KiB) Downloaded 1388 times
-
- Estima Codes.RPF
- Program
- (4.53 KiB) Downloaded 1649 times
Re: Shrinkage IRFs with Panel Data
You have no data at all for country 71 (Syria) for real GDP. It also has a typo in the gap series.
Re: Shrinkage IRFs with Panel Data
If I remove Syria from the dataset such as there were not enough data points. Now the number of countries are 78, the VAR is estimated but with the the following error message
"## M1. number = 78 is Illegal. Value should be between 1 and 20
. The Error Occurred At Location 107, Line 3 of loop/block"
I am not sure why the value should be from 1 to 20. Can you please help me with this?
Thanks in advance!
"## M1. number = 78 is Illegal. Value should be between 1 and 20
. The Error Occurred At Location 107, Line 3 of loop/block"
I am not sure why the value should be from 1 to 20. Can you please help me with this?
Thanks in advance!
Re: Shrinkage IRFs with Panel Data
If you do Edit-Show Last Error it will point you to the loop at the bottom that does the graphs. 20 is the limit on the number of series that can be graphed with a single GRAPH instruction prior to version 9.1. With 9.1, there is no longer any limit. The graph with the full set of 78 countries is attached. Obviously, the GDP to GDP (growth??) is fairly consistent, while the gender gap to GDP responses are all over the place.
- Attachments
-
- shrinkvar.pdf
- Graph with all countries
- (18.92 KiB) Downloaded 1311 times
Re: Shrinkage IRFs with Panel Data
Is there a way to label the impulse responses of some selected set of countries of interest in the same program? Thanks!
Re: Shrinkage IRFs with Panel Data
KEY=ATTACHED can be used to attach labels to the graphs. Whether there is room in one of those graphs to insert labels is another question.
Re: Shrinkage IRFs with Panel Data
Thanks for your reply! The instruction "key=attached" will provide labels for all the countries in the sample. That will indeed make the graph messy. If I am interested in responses of few selected countries, will it be possible to do that within the
program.
program.
Re: Shrinkage IRFs with Panel Data
Are you just looking to label a few graphs (while keeping all of them), or are you looking to just include and label a few of the graphs? The first is still going to be a bit of a mess.
Re: Shrinkage IRFs with Panel Data
I will like to include and label only some selected countries. Will that be possible?
Re: Shrinkage IRFs with Panel Data
This pulls out 4 of the responses (for, in this case, countries 5, 10, 15 and 20). The attached labels still don't really work on two "own" responses where there isn't much of a difference.
Code: Select all
dec vect[int] selector
compute selector=||5,10,15,20||
compute nselect=%size(selector)
dec vect[string] lselector(nselect)
ewise lselector(i)=country(selector(i))
dec vect[rect[series]] irfselector(nselect)
do is=1,nselect
compute i=selector(is)
compute coeffsi=%xsubvec(bmeans,i*varsize+1,(i+1)*varsize)
compute %modelsetcoeffs(varmodel,coeffsi)
impulse(model=varmodel,results=irf(is),$
cv=%identity(nvar),steps=24)
end do is
list iser = 1 to nselect
spgraph(vfields=nvar,hfields=nvar,footer="Shrinkage IRF's",$
xlabels=longvars,ylabels=longvars)
do i=1,nvar
do j=1,nvar
graph(number=0,nodates,key=attached,klabels=lselector) %size(selector)
cards irf(iser)(i,j)
end do j
end do i
spgraph(done)
Re: Shrinkage IRFs with Panel Data
Can we do VARX kind of estimation in the same set up where some variables are treated as exogenous variables? Please help.
Re: Shrinkage IRFs with Panel Data
Yes, but you would have to figure out how the shrinkage prior would work with a VAR-X rather than a VAR.
Re: Shrinkage IRFs with Panel Data
Is there an example program that you can help me with which does Panel VARX kind of estimations using shrinkage priors or any other method? Thanks in advance!
Re: Shrinkage IRFs with Panel Data
Sorry, no.
Re: Shrinkage IRFs with Panel Data
I want to do 2 more things in the context of this model. I have been asked to find confidence bands for the impulse responses and variance decomposition for the model. Could you please help me with this? Thanks in advance!