Announcement

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

  • Malformed notes section with 'outreg2' tex output (caused by commas)

    I am using 'outreg2' to make latex outputs of several regressions. I want to add a lengthy note at the bottom of the table. I have included the text in addnote() argument. The problem is that the command adds a line break after after each comma and centers the lines. Is there any way to avoid that? I really need the commas in the note, and I would rather use something else than centering, e.g. ragged right.

  • #2
    I would almost add the note myself in LaTex, sounds much easier than to make it work through STATA if you are having such issues with the code. I am not familiar with the -outreg2- package, so maybe an example of the code would also help?

    Comment


    • #3
      I prefer to use \input{stataOut.tex} in latex and therefore it is a bit inconvenient to add notes later on. I could process the Stata output tex file before inputing it in the tex file, but that is cumbersome. I was actually able to make this work with 'eststo' with some pain. There were some issues with 'eststo' though that made me to try 'outreg2'.

      Here is an example code of what I am doing:

      loc replace replace
      foreach x of loc vars {
      loc lab: var lab `x'
      reg `x' `didVars' `ctrls', cluster(clsId)
      outreg2 using stataOut, tex `replace' ///
      ctitle(´lab') label e(N r2) keep(`didVars') ///
      addt(Controls, Yes) ///
      addn(Some note text goes here, ... )
      loc replace
      }

      In this example I loop over a set of dependent variables, and the results get stored by column in the output tex file.

      Comment


      • #4
        What if you try this: addn("Some note text goes here, ... "), so that you wrap the whole text with quotation marks?

        Comment


        • #5
          I gave up already and resorted to tex(frag) option and then use \threeparttable{} in the tex file. That way I define caption, label and endnote in the tex file.

          Comment

          Working...
          X