Announcement

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

  • Adjust Column Width in Results Window for Describe Command

    I have run a simple describe of all variables (describe, f). I would like to change the width of the column " variable name" so that the longer variable names will fit on one line. (The reason is to easily Copy Table). This should be simple but I haven't found the right command in the "set" documentation.

    In the picture, I want the interstate_in_flag to be wide enough so that str1 and %1s are on the same line.

    This is my first post here, so thank you for bearing with my inexperience.


    Thank you,
    Spencer

    Click image for larger version

Name:	stata variable describe snip.PNG
Views:	3
Size:	68.0 KB
ID:	1350267
    Attached Files

  • #2
    Welcome to Statalist!

    Sorry to say, I think it's not possible to convince Stata to widen the columns in its display. However, this doesn't mean you have no recourse. Here's some code to point you in what may be a helpful direction.
    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . describe, replace clear
    
    . export delimited using autodescribe, replace
    file autodescribe.csv saved
    
    . export excel using autodescribe, replace
    file autodescribe.xls saved

    Comment


    • #3
      Thank you, William!

      For people using higher resolution screens, I feel that adjusting the display settings for the results window would be a very useful tool.
      That being said, your code worked perfectly to do what I needed to do.

      Best-
      Spencer

      Comment


      • #4
        Spence -

        In general, you will find that the formatting of textual output by Stata is not its greatest strength.

        If you want to print your results window to dead trees or create a PDF, whether or not you tell it to "print line numbers" the space they require is still reserved, reducing the space for information (Stata 14.1 for Mac). And the lines on the printout are wrapped as they wrapped at in the results window - which can mean they are trimmed on the right if your results window was too wide, or wrapped too narrowly otherwise. I wind up generating text log files that I open in a text editor, and I keep my results window set precisely to the number of characters that will fill a line at the font and size I use in the ditor.

        I guess that's why Stata's command for displaying data is list whereas in some alternative system it is print.

        Good luck!
        William

        Comment

        Working...
        X