Home Forums ASREG : Rolling window and Fama-MacBeth Regressions asreg: estimate regression by year and sector in Stata

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Post count: 118

    Dear Shah,

    I’m an accounting Ph.D. student and write a tutorial paper now.

    I often have to estimate regressions by year and by sector. In this article that I am working on now, this is also necessary. The way I did it was by using the “if” subcommands.

    But I found your package when I was reviewing it. When I try to estimate my regression by command:

    bys Firm_id Year : asreg TA_jones1991 InverseAT_jones1991 delta_Revenue_jones1991 PPE_jones1991

    The columns generated in my database are all like n.a.
    The database is available in this link:

    Can you help me when I may be wrong?

    All the best.

    Attaullah Shah
    Post count: 69

    bys firmid year means that the regression will be run on each year within each firmid, in your dataset, there are only one observation for each firmid per year, therefore, regression cannot be estimated on a single observation.

    Post count: 118


    The correct command would be

    bys B3_sector Year

    All the best.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.