Announcement

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

  • Volatility of country- and industry-adjusted return on asset(ROA)

    Hello,
    I am trying to measure the volatility of country- and industry-adjusted return on asset (σ(ROA)). For each year, I have to compute the difference between a firm’s ROA and the average ROA across all firms in the same four-digit SIC industry and from the country in which the company is registered.
    For the cross-sectional regressions, I calculate the standard deviation of the adjusted return on asset for each firm over the entire sample period (1999–2007):

    egen averageroa=mean(roa), by(industry country)
    bys FirmName (year): gen diff=roa-averageroa
    bys FirmName (year):egen vol=sd(diff)

    For the panel regressions, I have to measure the standard deviation of the adjusted return on asset for each firm over five-year overlapping periods (1999–2003, 2000–2004, 2001–2005, 2002–2006, and 2003–2007). How can I do that in stata?
    Thank you.
    Yilmaz



  • #2
    If I understand what you want to do, -stegen- will get it for you. -stegen- is a user-written command (Robert Picard & Nick Cox) that you can get from SSC (-ssc install stegen-; then see the help file for how to use it.)

    Comment


    • #3
      The correct spelling is xtegen. You can also use asrol from ssc.
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment


      • #4
        Attaullah's correction is also incorrect. I am confident that Clyde meant tsegen (SSC).

        On asrol (SSC): readers can search the forum for discussions of asrol and tsegen. As I understand it, tsegen can do everything that asrol can do, but the converse is not true. So tsegen supports windows of any kind, not just of a specified number of previous values; it supports a wider range of statistics; and it allows users to specify unequal weights. There is a different default on what to do with incomplete windows, but users can choose the same behaviour.

        Comment


        • #5
          Yes, I did mean tsegen. It was a typo.

          Comment


          • #6
            Thank you for all your answer and suggestion.

            Regards

            Comment

            Working...
            X