Announcement

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

  • Growth calculation in Stata

    Hi there,

    I'm planning to do an OLS-regression on Future firm growth of US manufactering companies over the period 2004-2014. Firm growth will be measured in 1 and 3-year employment growth and 1 and 3-year capexpenditure growth. Now I have around data on 5000 firm-years. My question: Is there a function in Stata whereby for example I can calculate 3-year emploment growth (emp (t=3)/ emp (t=0) for each firm year or do I just need to do the calculation by hand in excell?

    Thanks in advance!

    Cheers,

    Laurens

  • #2
    Please read the FAQ Advice again, especially #12. http://www.statalist.org/forums/help#stata Giving examples of your data to indicate variable names, types and structure is very helpful.

    I guess at a data structure with variables like firmid emp year

    There is no dedicated function but you can use commands to that end. It seems that you want to define growth as ratios between values and previous values.

    Code:
    tsset firmid year
    gen growth3 = emp/L3.emp
    gen growth1 = emp/L1.emp
    There is clearly no need to resort to excell, whatever that may be (perhaps MS Excel).

    Comment


    • #3
      Hi nick,

      Thanks for the reaction and the advice!
      I'm using Stata 13.1 and like you said I want to define growth as ratios between values and previous values.
      And I was indeed referring to MS Excel, but by rush I made a typo.
      However, I wasn't able to create those ratios by using my own variables. Below I will upload a print screen of my data set.
      Perhaps you (or anyone) could provide me some insight in to this.

      Thanks in advance,


      Laurens


      Comment


      • #4
        Regarding my previous question:
        I just managed to get the ratio's I wanted. However the growth ratios should corresponding with the Base-years(year 0). So that my data in the base year (=year 0) explains the employment growth between year 0 and 3. I have upload a print screen to specify. I want the data circled in red to be moved to the green circled box.


        This is how my regression looks right now:

        3-year employment growth = B0+ B1*Debtratio (data year-3) + B2*Cashflow(data year-3) .........

        But I want my regression will to like this:

        3-year employment growth = B0+ B1*Debtratio (data year-0) + B2*Cashflow(data year-0) ..........


        Thanks in advance,


        Laurens


        Comment


        • #5
          Again, as in #2, please note advice in http://www.statalist.org/forums/help#stata to the effect that (1) screenshots are often difficult to read (2) they do not allow copy and paste in any case.

          Comment


          • #6
            First, my apologies for the confusion. I will try to explain it the best I can.

            My data consists of the following variables downloaded from compustat:
            --------------------------------------------------------------------------------------------------
            storage display value
            variable name type format label variable label
            --------------------------------------------------------------------------------------------------
            gvkey str6 %6s Global Company Key
            datadate long %d Data Date
            fyear double %6.0g Data Year - Fiscal
            fyr double %4.0g Fiscal Year-end Month
            at double %18.0g Assets - Total
            capx double %18.0g Capital Expenditures
            chech double %18.0g Cash and Cash Equivalents - Increase/(Decrease)
            csho double %18.0g Common Shares Outstanding
            cstk double %18.0g Common/Ordinary Stock (Capital)
            dltt double %18.0g Long-Term Debt - Total
            dt double %12.0g Total Debt Including Current
            emp double %18.0g Employees
            intan double %18.0g Intangible Assets - Total
            lt double %18.0g Liabilities - Total
            ppegt double %18.0g Property, Plant and Equipment - Total (Gross)
            sale double %18.0g Sales/Turnover (Net)
            xint double %18.0g Interest and Related Expense - Total
            xrd double %18.0g Research and Development Expense
            prcc_c double %18.0g Price Close - Annual - Calendar
            sic str4 %4s Standard Industry Classification Code
            ngvkey float %9.0g float gvkey
            empgrowth3 float %9.0g 3-year employment growth
            --------------------------------------------------------------------------------------------------
            Sorted by: ngvkey fyear

            As said above I want to do a regression on the effect of the debt ratio in Year T on the employment growth between year T-T+3.

            This are the commands I used:

            .
            Code:
             generate ngvkey= real(gvkey)
            .
            Code:
             tsset ngvkey fyear
            panel variable: ngvkey (unbalanced)
            time variable: fyear, 2002 to 2014, but with gaps
            delta: 1 unit
            .
            Code:
            generate empgrowth3 = emp/l3.emp
            Using this commands I found the growth rates that I wanted. However, these growth rates are allocated to the data in T+3. Hence, if I would now do a regression, I'm researching the effect of the debt ratio in year T+3 on the employment growth between year T-T+3.

            Below is a sample of my data and I have highlighted my current (red) and wanted (green) situation. Any advice would be welcome.

            Conm fyear emp (Current) empgrowth3 debtratio (Wanted)empgrowth3
            A 2003 (T) 14.3 .5551457 1.153846
            A 2004 15.9 .5091037 1.032704
            A 2005 9.86 .5078301 1.490872
            A 2006
            (T+3)
            16.5 1.153846 .5379174 .8121212
            A 2007 16.42 1.032704 .7181818 .6760049
            A 2008 14.7 1.490872 .9886645 .7546259
            A 2009 13.4 .8121212 .8100903 .7716418
            A 2010 11.1 .6760049 .7959307 .9613513
            A 2011 11.093 .7546259 .6790472 .8732534
            A 2012 10.34 .7716418 .8655
            A 2013 10.671 .9613513 .8745677
            A 2014 9.69 .8732534 .9503584
            Thanks in advance,

            Laurens

            Comment


            • #7
              Isn't that F3.emp/emp ?

              Comment

              Working...
              X