Announcement

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

  • Using sortvar() option in -outreg2- with factor variables

    Hi all,

    I'm using -outreg2- to output the results of multiple equations with factor variables. For example, running the following two in order:

    Code:
    reg y x1 ib0.x2 i.Year , vce(robust) fvlabel
    outreg2 using `filename', dec(3) ///
    append label excel ///
    sortvar( Year )
    Code:
    reg y x1 ib0.x2 ib1.x3 i.Year , vce(robust) fvlabel
    outreg2 using `filename', dec(3) ///
    append label excel ///
    sortvar( Year )
    This fails to order the Year variable at the top. Replacing this with i.Year fails as well. Any advice?
    Last edited by Andrew Tai; 11 Oct 2017, 11:58.
Working...
X