Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Market_Share_Instability

    I have a panel data which comprise of firms operating in numerous countries. Some firms may not operate in some countries depending on the year. I would like to generate a variable called "market share instability" that is is measured by the sum of the absolute value of the annual market share changes, divided by the initial market share for each of the leading (top) four firms. The example of the data and the formula for the market share instability can be found below.
    year country firm_id market_share
    2003 China 1 5
    2003 China 2 20
    2003 China 3 15
    2003 China 4 10
    2003 China 5 30
    2003 China 6 5
    2003 China 7 5
    2003 China 8 3
    2003 China 9 7
    2003 Italy 1 30
    2003 Italy 2 40
    2003 Italy 3 5
    2003 Italy 4 .
    2003 Italy 5 .
    2003 Italy 6 .
    2003 Italy 7 5
    2003 Italy 8 20
    2003 Italy 9 .
    2003 Germany 1 40
    2003 Germany 2 5
    2003 Germany 3 5
    2003 Germany 4 5
    2003 Germany 5 5
    2003 Germany 6 20
    2003 Germany 7 15
    2003 Germany 8 5
    2003 Germany 9 .
    2004 China 1 5
    2004 China 2 25
    2004 China 3 10
    2004 China 4 5
    2004 China 5 35
    2004 China 6 5
    2004 China 7 5
    2004 China 8 3
    2004 China 9 7
    2004 Italy 1 35
    2004 Italy 2 40
    2004 Italy 3 .
    2004 Italy 4 .
    2004 Italy 5 .
    2004 Italy 6 .
    2004 Italy 7 5
    2004 Italy 8 20
    2004 Italy 9 .
    2004 Germany 1 45
    2004 Germany 2 5
    2004 Germany 3 5
    2004 Germany 4 5
    2004 Germany 5 5
    2004 Germany 6 25
    2004 Germany 7 10
    2004 Germany 8 .
    2004 Germany 9 .
    2005 China 1 10
    2005 China 2 30
    2005 China 3 10
    2005 China 4 15
    2005 China 5 25
    2005 China 6 .
    2005 China 7 .
    2005 China 8 3
    2005 China 9 7
    2005 Italy 1 30
    2005 Italy 2 35
    2005 Italy 3 .
    2005 Italy 4 .
    2005 Italy 5 5
    2005 Italy 6 .
    2005 Italy 7 10
    2005 Italy 8 20
    2005 Italy 9 .
    2005 Germany 1 50
    2005 Germany 2 .
    2005 Germany 3 5
    2005 Germany 4 5
    2005 Germany 5 5
    2005 Germany 6 25
    2005 Germany 7 10
    2005 Germany 8 .
    2005 Germany 9 .
    Click image for larger version

Name:	msi.png
Views:	3
Size:	5.5 KB
ID:	1386262

    Click image for larger version

Name:	msi2.png
Views:	2
Size:	9.2 KB
ID:	1386265



    Since I have only one industry in my data, "i" can represent the country for my case.

    So the numerator gives the summation of market share changes (for instance from 2003 to 2004) of the top leading 4 firms for a chosen country (e.g. China). Denominator gives the initial market share for each of the top 4 firms (i.e. in 2003) in China.

    If you could help me with this command, I will be grateful.
    Attached Files
    Last edited by sladmin; 04 May 2017, 10:43. Reason: Anonymize original poster

  • #2
    You didn't get a quick answer. You'll increase your chance of a useful answer by following the FAQ on asking questions - provide Stata code, Stata output, and sample data using dataex.

    You need to make some effort to solve your own problem. Let me give you some hints. Assuming you've xtset your data, you can use lags or difference functions with generate to calculate the differences MS(t+1) - MS(t), the fraction and the absolution value. Then you can use egen probably by year or country to calculate the sums.

    Comment

    Working...
    X