Dear Stata users,
I think I have a quite easy question, but since i am new to Stata I haven't been able to figure it out.
Below you can find a sample of my data set which consist out of 260 companies with monthly data over 13 years.
ame gwa return marketcap companyname year month date x portfolios
NOVOZYMES A/S - GOODWILL - GROSS .029167 .091569 .004189 155 2006 1 2006m1 1 2
MERCK KGAA - GOODWILL - GROSS .10902 .062225 .002097 143 2006 1 2006m1 1 3
NATURGY ENERGY GROUP - GOODWILL - GROSS .033331 .027543 .001873 148 2006 1 2006m1 1 2
DIAGEO PLC - GOODWILL - GROSS .012174 .04012 .00355 71 2006 1 2006m1 1 1
LANXESS AG - GOODWILL - GROSS .004368 .059602 .000501 135 2006 1 2006m1 1 1
SVENSKA CELLULOSA - GOODWILL - GROSS .127964 .122239 .011656 213 2006 1 2006m1 1 3
CAPGEMINI SE - GOODWILL - GROSS .23913 .017238 .000955 42 2006 1 2006m1 1 4
HEINEKEN HOLDING - GOODWILL - GROSS .176639 .060422 .001051 97 2006 1 2006m1 1 4
ALFA LAVAL AB - GOODWILL - GROSS .235412 .153414 .004812 11 2006 1 2006m1 1 4
ROYAL UNIBREW A/S - GOODWILL - GROSS .094737 .135891 .0006 182 2006 1 2006m1 1 3
GIVAUDAN SA - GOODWILL - GROSS .228314 .0049 .00111 93 2006 1 2006m1 1 4
TELEFONAKTIEBOLAGET - GOODWILL - GROSS .033887 .018313 .061239 221 2006 1 2006m1 1 2
SPECTRIS PLC - GOODWILL - GROSS .401544 .053161 .000137 207 2006 1 2006m1 1 5
NOKIA OYJ - GOODWILL - GROSS .024395 .021263 .008561 151 2006 1 2006m1 1 2
KBC GROUP NV - GOODWILL - GROSS .005253 .02719 .004501 125 2006 1 2006m1 1 1
NORDEA BANK ABP - GOODWILL - GROSS .006011 .005975 .038167 153 2006 1 2006m1 1 1
FIAT CHRYSLER - GOODWILL - GROSS .062612 .013937 .001863 86 2006 1 2006m1 1 3
RTL GROUP SA - GOODWILL - GROSS .628545 .059643 .001789 184 2006 1 2006m1 1 5
Now I want to calculate the average return of the 50 smallest companies (by marketcap) and the average return of the 50 biggest companies (by market cap)
Can somebody help me with the code?
Kind regards!
I think I have a quite easy question, but since i am new to Stata I haven't been able to figure it out.
Below you can find a sample of my data set which consist out of 260 companies with monthly data over 13 years.
ame gwa return marketcap companyname year month date x portfolios
NOVOZYMES A/S - GOODWILL - GROSS .029167 .091569 .004189 155 2006 1 2006m1 1 2
MERCK KGAA - GOODWILL - GROSS .10902 .062225 .002097 143 2006 1 2006m1 1 3
NATURGY ENERGY GROUP - GOODWILL - GROSS .033331 .027543 .001873 148 2006 1 2006m1 1 2
DIAGEO PLC - GOODWILL - GROSS .012174 .04012 .00355 71 2006 1 2006m1 1 1
LANXESS AG - GOODWILL - GROSS .004368 .059602 .000501 135 2006 1 2006m1 1 1
SVENSKA CELLULOSA - GOODWILL - GROSS .127964 .122239 .011656 213 2006 1 2006m1 1 3
CAPGEMINI SE - GOODWILL - GROSS .23913 .017238 .000955 42 2006 1 2006m1 1 4
HEINEKEN HOLDING - GOODWILL - GROSS .176639 .060422 .001051 97 2006 1 2006m1 1 4
ALFA LAVAL AB - GOODWILL - GROSS .235412 .153414 .004812 11 2006 1 2006m1 1 4
ROYAL UNIBREW A/S - GOODWILL - GROSS .094737 .135891 .0006 182 2006 1 2006m1 1 3
GIVAUDAN SA - GOODWILL - GROSS .228314 .0049 .00111 93 2006 1 2006m1 1 4
TELEFONAKTIEBOLAGET - GOODWILL - GROSS .033887 .018313 .061239 221 2006 1 2006m1 1 2
SPECTRIS PLC - GOODWILL - GROSS .401544 .053161 .000137 207 2006 1 2006m1 1 5
NOKIA OYJ - GOODWILL - GROSS .024395 .021263 .008561 151 2006 1 2006m1 1 2
KBC GROUP NV - GOODWILL - GROSS .005253 .02719 .004501 125 2006 1 2006m1 1 1
NORDEA BANK ABP - GOODWILL - GROSS .006011 .005975 .038167 153 2006 1 2006m1 1 1
FIAT CHRYSLER - GOODWILL - GROSS .062612 .013937 .001863 86 2006 1 2006m1 1 3
RTL GROUP SA - GOODWILL - GROSS .628545 .059643 .001789 184 2006 1 2006m1 1 5
Now I want to calculate the average return of the 50 smallest companies (by marketcap) and the average return of the 50 biggest companies (by market cap)
Can somebody help me with the code?
Kind regards!
Comment