Search found 21 matches

by Marcus
Tue May 22, 2018 8:17 am
Forum: Data: Reading, Writing, Transforming
Topic: Creating sums of series
Replies: 4
Views: 9605

Re: Creating sums of series

Yes it would.

thanx
by Marcus
Fri May 18, 2018 2:54 am
Forum: Data: Reading, Writing, Transforming
Topic: Creating sums of series
Replies: 4
Views: 9605

Re: Creating sums of series

Almost.
That yields a sum for all the years.

What I'm trying to do is to create a series of sums for every year.
by Marcus
Thu May 17, 2018 4:00 am
Forum: Data: Reading, Writing, Transforming
Topic: Creating sums of series
Replies: 4
Views: 9605

Creating sums of series

I have a number of series, named sharedkah to sharedkth for the period 2000 to 2016. I would like to sum the series for each year into a new series , "sumdk", which then would have the sum of all series 2000-2016. I can do it by matrices but I think there's an easier way. However, the belo...
by Marcus
Thu Feb 22, 2018 2:21 pm
Forum: Data: Reading, Writing, Transforming
Topic: Reading Panel Data Set
Replies: 24
Views: 209567

Re: Reading Panel Data Set

No it's 45 observations per cross section unit.
So the last date should be 2014:1. You get 2004:1 and also 234 cross section units instead of 182
by Marcus
Thu Feb 22, 2018 9:00 am
Forum: Data: Reading, Writing, Transforming
Topic: Reading Panel Data Set
Replies: 24
Views: 209567

Re: Reading Panel Data Set

I'm trying to read in the attached file with data for 182 countries for the period 1970-2014. Some variables, such as EMP, have missing values for the first cross-section unit. When I look at it in the Series window it says that it begins in 1991:1 instead and runs to 2035. For the series CTFP, five...
by Marcus
Tue Feb 20, 2018 6:45 am
Forum: Data: Reading, Writing, Transforming
Topic: Rats crashing after make(panel) command
Replies: 3
Views: 7848

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 a...
by Marcus
Mon Feb 19, 2018 5:04 am
Forum: Data: Reading, Writing, Transforming
Topic: Rats crashing after make(panel) command
Replies: 3
Views: 7848

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}...
by Marcus
Thu Feb 15, 2018 10:02 am
Forum: Data: Reading, Writing, Transforming
Topic: Removing outliers
Replies: 1
Views: 6156

Removing outliers

Suppose I have two series x1 and x2 that I want to plot towards each other. X1 has some outliers for instance three values above 10 000. I want to get rid of those and the matching observations in x2. What would be the easiest way to do that? I've tried some alternative but they're clumpsy and don't...
by Marcus
Mon Feb 05, 2018 3:26 pm
Forum: Data: Reading, Writing, Transforming
Topic: Calculating annual average growth rates in a panel
Replies: 2
Views: 7290

Re: Calculating annual average growth rates in a panel

Yes, the idea was to get just one value for each country, the annual average growth rate between 1970 and 2017 and then make a scatter graph with that on the y-axis and the 1970-value on the x-axis
by Marcus
Mon Feb 05, 2018 8:32 am
Forum: Data: Reading, Writing, Transforming
Topic: Calculating annual average growth rates in a panel
Replies: 2
Views: 7290

Calculating annual average growth rates in a panel

So using the Penn World Tables, I tried to calculate these growth rates. I expected to get one value for each country/cross section unit but my "best" attempt gave me one value for each year. Here's a code that not even produced the values for each year. Any help on this would be greatly a...
by Marcus
Fri Dec 21, 2012 9:03 am
Forum: Looking for Code?
Topic: Kuttner, K. N.(1994). Estimating potential output ...
Replies: 0
Views: 4316

Kuttner, K. N.(1994). Estimating potential output ...

I'm wondering whether it would be possible to see the code for the bivariat model in this article "Estimating potential output as a latent variable" from Journal of Business & Economics Statistics, Vol. 12, No. 3 (July 1994), pp. 361-368.


/Marcs
by Marcus
Wed Jul 11, 2012 11:12 am
Forum: Data: Reading, Writing, Transforming
Topic: Transformation in a loop
Replies: 5
Views: 9370

Re: Transformation in a loop

That sounds about right. If three of the series have positive values at 1998:3, the new series, summing 1's over rows, should have a 3 for 1998:3.
by Marcus
Wed Jul 11, 2012 1:28 am
Forum: Data: Reading, Writing, Transforming
Topic: Transformation in a loop
Replies: 5
Views: 9370

Re: Transformation in a loop

Thanx, I didn't explain the summation request properly. What I need is a sum across entries, i.e. a sum of 1's and 0's for each time period, (a vector with two columns of sums for each period). In other words, row sums o rather than column sums. Changed to sums(2) and tried to include a loop over j ...
by Marcus
Tue Jul 10, 2012 8:47 am
Forum: Data: Reading, Writing, Transforming
Topic: Transformation in a loop
Replies: 5
Views: 9370

Transformation in a loop

Hi, My problem: I have a number of variables for which I have calculated one-period changes. This yielded positive (some zero) and negative values for the variables. I want to code the negative values into 0's and the non-negative into 1's. Unfortunately the code below produces 1's for all entries a...
by Marcus
Wed Jun 27, 2012 10:13 am
Forum: Data: Reading, Writing, Transforming
Topic: Reading data into matrices with labels for rows and columns
Replies: 1
Views: 6042

Reading data into matrices with labels for rows and columns

Hi, I'm trying to read data into symmetric matrices. To keep track of my calculations I would like to read in also labels for columns and rows. I have tried the READ instruction and it should be possible to read in labels for at least either rows or columns but I haven't been very successful sofar. ...