[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"ALICE DOBSON" <alice_dobson@hotmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
FW: Re: st: Generate a new variable [four firm concentration ratio] |

Date |
Mon, 21 Nov 2005 18:41:41 -0500 |

Sorry for the lack of clarity in the preceding mail. Let me try to rephrase what I meant! In cases where the rows do not have the data on number of consumers for all seven firms the command [rowsort , gen (s1-s7) descend] arranges the values in such a way that missing values precede the other given values

Hence, as a result I do not obtain "firstfour"

Best,

Alice

From: "ALICE DOBSON" <alice_dobson@hotmail.com>_________________________________________________________________

Reply-To: statalist@hsphsun2.harvard.edu

To: statalist@hsphsun2.harvard.edu

Subject: Re: st: Generate a new variable [four firm concentration ratio]

Date: Mon, 21 Nov 2005 18:27:49 -0500

Thanks Nick. It works selectively as I am not getting "firstfour" for all rows.

This is probably because the rows have values for one to seven firms and not for all seven firms

Further, I checked the data editor and see that in such cases where the data is avaiable for less than seven firms the command arranges the top four values s1-s4 (arbitrarily) in columns for say s3-s6

Hence, I do not get firstfour for all such cases

Best,

Alice

From: n j cox <n.j.cox@durham.ac.uk>_________________________________________________________________

Reply-To: statalist@hsphsun2.harvard.edu

To: statalist@hsphsun2.harvard.edu

Subject: Re: st: Generate a new variable [four firm concentration ratio]

Date: Mon, 21 Nov 2005 21:31:19 +0000

If the number of consumers is integer, then

just install -rowsort- from SSC.

rowsort F?_mt, gen(s1-s7) descend

gen firstfour = 100 * (s1 + s2 + s3 + s4) / CONSUM_mt

Nick

n.j.cox@durham.ac.uk

ALICE DOBSON

I use stata 9.1

I have an unbalanced panel data of the type:

geographical region (m = 1..1154)

year (t = 1..7)

with the following variables:

total number of consumers in each region (CONSUM_mt)

total number of consumers of seven firms in each region (F1_mt, F2_mt, F3_mt, F4_mt, F5_mt, F6_mt, F7_mt)

I want to calculate the four firm concentration ratio for each region, C4_mt, which is the proportion of the number of consumers of top four firms to the total number of consumers in that region, in percentage

Could anyone be kind enough to help me with this simple calculation?

GEOGREGN YEAR CONSUM F1 F2 F3 F4 F5 F6 F7 C4

M1 1969

M1 1970

M1 1971

M1 1972

M1 1973

M1 1974

M1 1975

M2 1969

M2 1970

M2 1971

M2 1972

.

.

.

.

.

.

.

.

*

* For searches and help try:

* http://www.stata.com/support/faqs/res/findit.html

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

*

* For searches and help try:

* http://www.stata.com/support/faqs/res/findit.html

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

*

* For searches and help try:

* http://www.stata.com/support/faqs/res/findit.html

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: Generate a new variable [four firm concentration ratio]** - Next by Date:
**RE: st: Generate a new variable [four firm concentration ratio]** - Previous by thread:
**Re: st: Generate a new variable [four firm concentration ratio]** - Next by thread:
**RE: st: Generate a new variable [four firm concentration ratio]** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |