Announcement

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

  • Export to Latex

    I have the following code in stata to export results to a table in LaTex, however the results I get doesn't succesfully translate into a functioning table in Overleaf. Is there any error in the export code?



    esttab matrix(diff) using "${tables}/Descriptives.tex", replace ///
    cells("mean(fmt(3)) sd(fmt(3)) count(fmt(3))") ///
    collabels("Mean" "SD" "Obs.") ///
    alignment(S) ///
    booktabs nomtitles nonumber

  • #2
    Without seeing the output of this command or the error you get in Overleaf, I'm guessing that this is due in some way to the "alignment(S)" parameter. It should have one specification for each data column, i.e. "alignment(S S S)". Also ensure the siunitx package is loaded in Overleaf. The package will break on the column labels; the simplest solution there is to put them in braces: "collabels("{Mean}" "{SD}" "{Obs.}")".

    Comment

    Working...
    X