Rats crashing after make(panel) command
Rats crashing after make(panel) command
This is what I'm trying to do:
OPEN DATA "H:\My Documents\gamlalocal\Makro\Penn\pwt90forrats_7014.xlsx"
CALENDAR(PANELOBS=45,A) 1970:1
DATA(FORMAT=XLSX,ORG=COLUMNS,SHEET="Data",RIGHT=5) 1//1970:01 182//2014:01 c_number year rgdpe rgdpo pop
set agrgdepop = 100*((rgdepop/rgdepop{1}) -1.0)
set agrgdopop = 100*((rgdopop/rgdopop{1}) -1.0)
make(panel) stdagrgdepop
# agrgdepop
Unfortunately the program stops working.
The series contains more 182*44 observations which is rather much.
OPEN DATA "H:\My Documents\gamlalocal\Makro\Penn\pwt90forrats_7014.xlsx"
CALENDAR(PANELOBS=45,A) 1970:1
DATA(FORMAT=XLSX,ORG=COLUMNS,SHEET="Data",RIGHT=5) 1//1970:01 182//2014:01 c_number year rgdpe rgdpo pop
set agrgdepop = 100*((rgdepop/rgdepop{1}) -1.0)
set agrgdopop = 100*((rgdopop/rgdopop{1}) -1.0)
make(panel) stdagrgdepop
# agrgdepop
Unfortunately the program stops working.
The series contains more 182*44 observations which is rather much.
Re: Rats crashing after make(panel) command
The gaps due to the lost data point in converting to growth rates are what's causing the problem with that.
dec rect stdagrgdepop(44,182)
ewise stdagrgdepop(i,j)=agrgdepop(j//(i+1))
will create the reduced matrix.
dec rect stdagrgdepop(44,182)
ewise stdagrgdepop(i,j)=agrgdepop(j//(i+1))
will create the reduced matrix.
Re: Rats crashing after make(panel) command
Yes it did. Thanx.
I managed to do it by first making a vector (%vec), then an array (%vectorect) which I reshaped it into a matrix.
Using that I created 182 series for which I calculated the standard deviations.
In the end what I wanted to do was to make a scatter graph of the standard deviations against the gdp per capita in 2014: rgdepop (2014:1). (rgdepop=rgde/pop)
I had some problems choosing the 2014 entry for rgdepop but managed to do that in a very cumbersome way.
I first made a matrix out of rgdepop, then extracted the column corresponding to the 2014:1 observations, and made a series out of that.
And finally I could make the scatter graph.
There must be an easier way to do this which I would appreciate if you could show me.
I managed to do it by first making a vector (%vec), then an array (%vectorect) which I reshaped it into a matrix.
Using that I created 182 series for which I calculated the standard deviations.
In the end what I wanted to do was to make a scatter graph of the standard deviations against the gdp per capita in 2014: rgdepop (2014:1). (rgdepop=rgde/pop)
I had some problems choosing the 2014 entry for rgdepop but managed to do that in a very cumbersome way.
I first made a matrix out of rgdepop, then extracted the column corresponding to the 2014:1 observations, and made a series out of that.
And finally I could make the scatter graph.
There must be an easier way to do this which I would appreciate if you could show me.
Re: Rats crashing after make(panel) command
That depends upon what you want to do with it, but using a SMPL=%PERIOD(T)==2014:1 will restrict any instruction with a SMPL option to look only at the 2014:1 entries across individuals.