Hi all,
I have a panel database as shown below and need to calculate the levels of type 1 as % of levels in type 3 for the same countries. What command allows me to get the sample in brackets below?I couldn't get this with egen and by. Thanks.
year type level country [I want Type 1 level as % of Type 3 level]
2000 1 20 A 10
2001 1 20 A 10
2002 1 30 A 30
.
.
.
2000 2 100 A
2001 2 100 A
2002 2 100 A
.
.
,
2000 3 200 A
2001 3 200 A
2002 3 200 A
.
.
.
I have a panel database as shown below and need to calculate the levels of type 1 as % of levels in type 3 for the same countries. What command allows me to get the sample in brackets below?I couldn't get this with egen and by. Thanks.
year type level country [I want Type 1 level as % of Type 3 level]
2000 1 20 A 10
2001 1 20 A 10
2002 1 30 A 30
.
.
.
2000 2 100 A
2001 2 100 A
2002 2 100 A
.
.
,
2000 3 200 A
2001 3 200 A
2002 3 200 A
.
.
.
Comment