Announcement

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

  • Statsby and naming interactions

    I would like to save the standard errors and coefficients from a series of regressions (by year) - something along the lines of:

    *statsby _b _se, by(year) clear: reg workblk age female income b0.educat##b1.polviewscat

    Where educat has four categories and polviewscat has three categories.

    However, I really only am interested in saving in the coefficients and standard errors on the interaction terms. My question is how to identify the names of the interaction terms and match them up correctly? This would help, I think, in both telling Stata only to save those particular coefficients and it would also help in letting me rename the vars as something more useful, using this option:

    *statsby newvar=_b[xvar] _se, by(year) clear: reg workblk age female income b0.educat##b1.polviewscat

    I hope this makes sense.

  • #2
    Well, we don't know how many, or what values, these variables take on, and that is critical to the answer. But here's how you can find the names for yourself. Run
    Code:
    reg workblk age female income b0.educat##b1.polviewscat, coefl
    and Stata will show you the names it uses.

    Comment

    Working...
    X