Announcement

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

  • Hiding variables to be displayed using outreg2

    Dear Stata listers

    I have run my regression and would like to display my results using outreg2. I have read the manual and chosen some variables which I want to display using the following function -outreg2 (list of variables which I want it to display) using (filename)-

    In my regression, I have generated some factor variables using i.variablename e.g. i.month. I did not choose to display these automatically generated dummies in outreg2 but it still appears.

    I have found many threads online where people want to display the factor variables and interaction terms but outreg2 does not display them. My problem is the exact opposite. I do not want outreg2 to display those variables.

    Can someone help me on this? Thank you.

  • #2
    Apologies if you've already tried this: in help outreg2 (outreg2 is user-contributed software in SSC), the first of the examples listed in the Example 8 section seems to imply that drop(list of variables you do not want to display) is required to suppress output, and other examples suggest that the purpose of the initial list of variables is to control the order of variables in the report. rather than to select the variables to include.

    Comment


    • #3
      Thanks for the suggestion William.

      I think it works now. Though I find it very odd as I should be able to select variables to keep instead of having to drop unwanted variables. That's what I found on other websites. But since it works now, that's not an issue.

      Comment


      • #4
        Though I find it very odd as I should be able to select variables to keep instead of having to drop unwanted variables.
        Try with keep(varlist) instead of drop(varlist).

        Comment


        • #5
          In my post at #2 above, I should not have implied that drop(varlist) was required. My post was intended to point out help outreg2 as a source of quick assistance in using outreg2, and Charlie's suggestion of keep(varlist) is also documented in the help file in section 8, helpfully titled "Drop/keep/order variables". I found the help file for outreg2 (a user-written command) to be particularly thorough, in that having never used outreg2, I was able to quickly find a solution (but not necessarily the best) to the problem at hand. And I find that true of Stata help files far more often than not.

          Comment

          Working...
          X