Announcement

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

  • How to show persistence using panel data

    Dear stata users and experts,

    My data is firm year panel data, i.e., I have observations at firm level and across years. These firms are from different industries identified by industry SIC code.

    I have firm specific characteristics, e.g. its inventory turnover ratio (or other financial ratio),

    My hypothesis is that one of such ratios could be persistent over time either at firm level or at industry level.

    How do I show that the ratios are persistent or it is not?

    Let me give you an example, say firm A is in retail industry, its inventory turnover ratio hovers around 10 for the last 14 years (some years slightly higher than 10, others slightly lower than 10), that is quite persistent.

    say, the retail industry average inventory turnover is 9 over last 14 years,

    given that I have thousands of firms, and over 30 industries, I can't show this by report each firm or industry's mean .

    I want to show it in a more efficient way. I know posters here are statisticians, cliometrician, etc. Can you suggest something or a paper I can follow their method ?

    Thanks a lot,

    Rochelle

  • #2
    The persistence will manifest itself in terms of serial correlation in the residuals of your estimated model. If your goal is to show that the ratios are persistent over time, I do not think that you can do better than graphing. The rationale is simple: if the individual series are persistent, the mean of the series will exhibit the persistence.

    Code:
    webuse xtcoint, clear
    xtset id time
    *INDIVIDUAL SERIES
    xtline productivity if inrange(id, 1, 4), scheme(s1mono)
    keep if inrange(id,1, 4)
    collapse productivity, by(time)
    *MEAN OF SERIES
    line productivity time, scheme(s1mono)
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	69.8 KB
ID:	1536774



    Click image for larger version

Name:	Graph3.png
Views:	1
Size:	47.5 KB
ID:	1536775

    You could also just create a scatter plot of the ratios over time and a line or curve showing the trend.

    Code:
    webuse xtcoint, clear
    tw (scatter productivity time if inrange(id, 1,4), msize(tiny)) ///
    (lfit productivity time if inrange(id, 1,4), scheme(s1mono) )
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	78.3 KB
ID:	1536776

    Comment


    • #3
      Thank you so much Andrew for providing both the script and the graph ! This is very helpful ! I've never done graph in Stata before.

      My follow-up question is: my firm level data is across multiple industries. How can I modify your code to display whether the ratio is persistent for each industry?

      or

      what is the best way to verify whether such persistence exist for industry level data?

      To put it another way, how can we show retail industry's productivity ratio is persisent or not. what about restaurant industry , etc.

      For others who read this post, my data is firm -year observations, I also have each firm's industry code, so I can group firms by industries.

      Thanks to all !

      R.

      Comment


      • #4
        Something like this?

        Code:
        webuse xtcoint
        gen industry= cond(inrange(id, 1, 25), 1, cond(inrange(id, 26, 50), 2, cond(inrange(id, 51, 75), 3, 4)))
        lab def industry 1 "Retail" 2 "Manufacturing" 3 "Construction" 4 "Healthcare"
        lab values industry industry
        collapse productivity, by(industry time)
        xtset industry time
        xtline productivity, scheme(s1mono)
        Click image for larger version

Name:	Graph.png
Views:	1
Size:	60.3 KB
ID:	1536782

        Comment


        • #5
          Dear Andrew,

          Thanks again for the update and help !



          Is my interpretation below correct based off your code (post #4):
          cond(inrange(id,1, 25), 1, cond(inrange(id, 26, 50), 2, cond(inrange(id, 51, 75), 3, 4)

          here you assume the first 25 are in industry 1, next 25 in industry 2, next 25 in industry 3,

          and the rest is assigned to industry 4.


          *** my data structure

          below is a snap shot of my data (real data has over 10000 firm-year panel observations, and over 40 plus industries)

          my question is about how to modify your code to show the trend,

          the no. of firms in each industry vary and the panel is unbalanced, what is the most efficient way to show persistent by industry ?


          * Example generated by -dataex-. To install: ssc install dataex


          Code:
          clear
          input int(id year) byte industryid double turnover
          1001 1990 21 .2 
          1001 1991 21 .23 
          1001 1992 21 .25 
          1001 1993 21 .24 
          1002 1990 21 .12 
          1002 1991 21 .22 
          1002 1992 21 .21 
          1003 1990 31 .14 
          1003 1991 31 .12 
          1003 1992 31 .2 
          1003 1993 31 .24 
          2001 1990 31 .25 
          2001 1992 31 .26 
          2001 1993 31 .25 
          2001 1994 31 .29 
          end

          Comment


          • #6
            Is my interpretation below correct based off your code (post #4):
            cond(inrange(id,1, 25), 1, cond(inrange(id, 26, 50), 2, cond(inrange(id, 51, 75), 3, 4)

            here you assume the first 25 are in industry 1, next 25 in industry 2, next 25 in industry 3,

            and the rest is assigned to industry 4.
            Yes.


            below is a snap shot of my data (real data has over 10000 firm-year panel observations, and over 40 plus industries)

            my question is about how to modify your code to show the trend,

            the no. of firms in each industry vary and the panel is unbalanced, what is the most efficient way to show persistent by industry ?
            The issue is whether the mean values of the variable vary a lot across industries and not so much that you have 40 industries. If the variance is large, then define groups according to size, e.g., large firms (turnover greater than XX dollars), medium-sized firms (turnover between XX and XX dollars) and small firms (turnover less than XX dollars) and graph the industries according to size. Below where the variance is not large, I have no issues discerning the general trend from the 40 combined graphs.

            Code:
            webuse xtcoint, clear
            xtline productivity if inrange(id, 1, 40), scheme(s1mono)
            Click image for larger version

Name:	Graph.png
Views:	1
Size:	59.6 KB
ID:	1536828


            The code in your case follows #4, but check whether a common axis is suitable or you need to group according to size.

            Code:
            collapse turnover, by( industryid year)
            xtset industryid year
            xtline turnover, scheme(s1mono)

            Comment


            • #7
              Thank you Andrew very much !!!

              Let me explore more data more.

              Comment

              Working...
              X