Rats crashing after make(panel) command

For questions and discussion related to reading in and working with data.
Marcus
Posts: 21
Joined: Wed May 19, 2010 5:12 am

Rats crashing after make(panel) command

Unread post by Marcus »

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.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Rats crashing after make(panel) command

Unread post by TomDoan »

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.
Marcus
Posts: 21
Joined: Wed May 19, 2010 5:12 am

Re: Rats crashing after make(panel) command

Unread post by Marcus »

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.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Rats crashing after make(panel) command

Unread post by TomDoan »

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.
Post Reply