Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72764

Calculating a multilateral GEKS price index

$
0
0
Stata 14/ Windows
I am trying to calculate a multilateral GEKS price index where bilateral Tornqvist price indices are its inputs.
I understand the concept of how it works, but I'm having a hard time how to program this with Stata.


I'll give a very small sample of data, 3 periods (m = 0,1 , and 2), products (i= 1 or 2)
Code:
clear all
input id product_id period price
1 1 201501 2
2 1 201502 3
3 1 201503 7
4 2 201501 2
5 2 201502 5
6 2 201503 4
end
Lets say I calculate bilateral price indices (Pmn) where m stand for the base period m and n for period n.
For simplicity lets say we calculate the bilateral price index P02 as product[pi2/pi0] with pi2 equal to the price of product i in period 2. And pi0 the price of product i in period 0.
So P02 = [7/2] * [4/2] = 7

To calculate the mulitlateral GEKS price index (Pgeks02) I need all possible combinations of two steps to get from period 0 to period 2.
So P00*P02, P01*P12, P02*P22 are all possible combinations. So I need (m*2 =) 6 bilateral price indices to calculate 1 multilateral GEKS index.

P00 = P22 = Pmm = 1
P01 = [3/2] * [5/2] = 3,75
P02 = 7 (twice)
P12 = [7/3] * [4/5] = 1,87

Pgeks02 = { [P00*P02] * [P01*P12] * [P02*P22] } ^(1/3) = 7

To calculate Pgeks01 I need the following 6 bilateral indices:
P00*P01, P01*P11, P02*P21

P21 = [3/7] * [5/4] = 0,54

Hopefully this all makes some sense. I have 50 periods and over 200 products in the complete dataset.
So I am looking for Pgeks01, Pgeks02, Pgeks03,.....,Pgeks050.
Which means I need 50*2 = 100 bilateral indices to calculate just 1 multilateral index.
Any ideas on how to tackle this problem are welcome.
Thank you in advance.

Johan

Viewing all articles
Browse latest Browse all 72764

Trending Articles