Announcement

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

  • Export missings to file

    Hello everyone, thank you in advance for any insight you can provide to solve my problem.

    I need to export to a latex file the output of mdesc, for I am writing a detailed description of the data.

    I tried the different versions of nmissing, missings, misstable. However when I try to export the outcome (e.g. using esttab) I get an error message, or I get simply 'N" the number of observations in the whole sample.

    If you have any clue, it would be greatly appreciated.

    Thank you!

  • #2
    Welcome to Statalist.

    Unfortunately, none of the commands you mention saves the tabular output in a matrix that could then be input to esttab to produce your latex outpiut.

    It may perhaps be quickest to copy your mdesc outpout from Stata's Results window and paste it into a suitable latex editor. Note the important help Stata can give: if you select the lines with your outpiut table in the Results window and then from Stata's Edit menu choose Copy Table, Stata will make the effort to turn your table into tab-delimited lines on your clipboard, retaining just the headings, stubs, and data, and eliminating the horizontal and vertical lines.

    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . mdesc mpg rep78
    
        Variable    |     Missing          Total     Percent Missing
    ----------------+-----------------------------------------------
                mpg |           0             74           0.00
              rep78 |           5             74           6.76
    ----------------+-----------------------------------------------
    and here's a screen capture of a text editor window into which I pasted the "Copy Table" for this - the triangles represent tab characterts.
    Click image for larger version

Name:	tabs2.png
Views:	1
Size:	21.2 KB
ID:	1498020

    Comment


    • #3
      Oh, thank you, yes I suppose that's what I'm going to have to do. I think when I get more proficient in this I will try to implement the option. Neither esttab nor outreg work.

      Comment

      Working...
      X