Announcement

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

  • formatting issues when using outreg2

    Hi!
    I am currently researching to see the learning effects of past acquisitions on acquisiton premiums.
    I am currently trying to output my models using the outreg2 function but when I output all my models (total of 8) the order of the variables becomes mixed up. Would appreciate any suggestions on how to fix this.

    My current do list looks like:
    xtreg premium1m relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) replace
    xtreg premium1m FA relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    xtreg premium1m FA ratiolagsmallg5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    xtreg premium1m FA ratiolagsmalll5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    xtreg premium1m FA ratiolagsmallg5d_h ratiolagsmalll5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    xtreg premium1m FA ratiolagsmallg5d_h faxlagsmallg5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    xtreg premium1m FA ratiolagsmalll5d_h faxlagsmalll5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    xtreg premium1m FA ratiolagsmallg5d_h ratiolagsmalll5d_h faxlagsmallg5d_h faxlagsmalll5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear if announcedyear>=1990 & financial==0 & sought>50, fe r
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append

    where the variables "FA ratiolagsmallg5d_h ratiolagsmalll5d_h faxlagsmallg5d_h faxlagsmalll5d_h" represent my independent and interaction variables and all other variables are my controls.
    After running these regressions, I click on the file,
    Until model 3, each additional new variable appears BEFORE the controls (i.e.: the order of the variables on the very left column is: FA, ratiolagsmallg5d_h + controls) however, starting from model 4, each additional new variable appears AFTER the controls rather than BEFORE the controls (i.e.: order of variables is: FA, ratiolagsmallg5d_h + controls+ratiolagsmalll5d_h+faxlagsmallg5d_h + faxlagsmalll5d_h).
    I have also attached the output file to help demonstrate.


    //Version of outreg2//
    . which outreg2
    c:\ado\plus\o\outreg2.ado
    *! outreg2 2.3.2 17aug2014 by [email protected]
    *! based on outreg 3.0.6/4.0.0 by [email protected]


    Also, this is unrelated to outreg2, but does anyone also happen to know if there is a command that basically means "EXCEPT BLANKS" that can be used when tabbing variables?
    Thank you so much!
    Attached Files

  • #2
    Reposting the above content in a more organized and easier to view manner:
    My issue is that when I use the command outreg2 the order in which my variables are listed becomes mixed up.
    For Models 1-3: each new additional variable from each model appears at the top of the list. Starting from Model 4 onwards, each new additional variable appears at the bottom of the list.
    As a result, my independent variables are split with some appearing before (on top of) the control variables and the rest appearing after (below) the control variables.
    I am using stata se 12.1
    My do file looks like the following:
    Code:
    *model1
    xtreg premium1m relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear 
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) replace
    *model2
    xtreg premium1m FA relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear 
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    *model3
    xtreg premium1m FA ratiolaggain5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear 
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    *model4
    xtreg premium1m FA ratiolagloss5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear 
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    *model5
    xtreg premium1m FA ratiolaggain5d_h ratiolagloss5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    *model6
    xtreg premium1m FA ratiolaggain5d_h faxlaggain5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear 
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    *model7
    xtreg premium1m FA ratiolagloss5d_h faxlagloss5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    *model8
    xtreg premium1m FA ratiolaggain5d_h ratiolagloss5d_h faxlaggain5d_h faxlagloss5d_h relsizesz acqrtotaldebtequity termination unhostiled tgtdefense competing stock acqrbm tgtbm tgtfatier1 i.announcedyear 
    outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append
    The lefthand column shows the resulting order of variables that I get from using outreg2 and the righthand column shows the results I'd like.
    FA FA
    ratiolaggains ratiolaggains
    relsizesz ratiolagloss5d_h
    acqrtotaldebtequity faxlaggain5d_h
    termination faxlagloss5d_h
    unhostiled relsizesz
    tgtdefense acqrtotaldebtequity
    competing termination
    stock unhostiled
    acqrbm tgtdefense
    tgtbm competing
    tgtfatier1 stock
    ratiolagloss5d_h acqrbm
    faxlaggain5d_h tgtbm
    faxlagloss5d_h tgtfatier1
    Constant Constant
    Observations Observations
    R-squared R-squared


    Is anyone else experiencing similar problems when using outreg2? Any ideas what is causing this?? Is this a bug?


    Thank you in advance!!

    Comment


    • #3
      I had similar issues, but tried changing variables positions in my regression line. If that does not work for you, then you can cut paste whole lines (variables) of the tables from place to another in the MS word file.
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment


      • #4
        I came across this while looking for a solution. You could try the following
        Code:
         
         outreg2 using alternative-fin&maj.doc, drop (i.announcedyear) append sortvar(var1 var2...)

        Comment

        Working...
        X