Announcement

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

  • Combine regression coefficients in one table

    Hi!

    I'm trying to rebuild the following regression model, but unfortunately I'm having some problems. What the regression tries to identify is if a change in regulation has influenced market quality. So my depended variable is a market quality measure whereas my independent variables are a set of control variables and a dummy which takes the value 1 after the regulation change. The regression is done for each company and then summarized cross-sectionally.

    I have managed to run the regression for each company ( bysort(id): reg y x dummy) but I'm wasn't able to find a command for the summarize.

    Hopefully someone can help me.

    Kind regards
    Nico Keller

  • #2
    Code:
     ( bysort(id): reg y x dummy)
    This is not a valid Stata command. Search help for -help statsby-
    Roman

    Comment


    • #3
      Hello Roman,

      thanks for your help. In the earlier message I made a mistake. The correct command is bysort id:reg y x dummy and gives me exact the same coefficients like statsby. Nevertheless both commands do not summarize the individual coefficients. What I'm looking for is a table where all coefficients for each variable are summarized to one value (as well as on standard error and one r^2). Can I do that with the statsby command?

      Comment


      • #4
        One alternative is to do one regression where you interact the company identifier with your x variables. Then you can work with the coefficients directly.

        If you have a pile of companies, you might do a loop that does the regression and then writes the parameters of interest into a variable. You'll need a counter so each company becomes a separate observation number in that output variable. After you have this done, you can do anything you want with the parameters.

        However, I think you'll find that statsby will write the parameters for you. You then just need to do the mean etc.

        However, if you're going to describe only the distribution, it sounds like you're really trying to do a random coefficients model. Look at xtrc in the documentation.

        Comment

        Working...
        X