Announcement

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

  • Outputting results using outreg2 for regression by group

    Hi
    quite inexperienced stata user here.
    I have c. 1200 observations but only c. 500 of them are of interest to me in my analysis - they are part of a group, denoted by a 1 in a categorical variable. I've run an OLR regression using the "by" command and have gotten results in the window for "1" group and "0" group, which is what I am looking for. I tried using outrreg2 to output the results to a word file but am getting an error as follows:

    matrix e(b) not found; run/post a regression, or specify varlist for non-regression outputs

    Could anyone help me resolve this?

    Thanks

    James

  • #2
    when you by, it will only post the second regression results.

    Code:
    clear all
    sysuse auto, clear
    
    outreg2 using myfile, replace word: reg price weight mpg if foreign
    outreg2 using myfile,  word:  reg price weight mpg if !foreign

    Comment

    Working...
    X