Announcement

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

  • Table without exponential written numbers

    Hello all,

    I am trying to get table out of the summarize command without exponential numbers.

    The numbers are marketvalue amounts and now in format of a float variable %9.0f. The largest numbers have 9 digits and the variable does not have negative values.
    In the data editor the numbers are written in complete, but when I run:
    Code:
    sum marketvalue
    Then I get a table like this:
    Click image for larger version

Name:	Sum marketvalue.png
Views:	1
Size:	3.2 KB
ID:	1446390

    I would like to have these e+07 and e+08 numbers written out in full. These numbers are displayed in this form as well when I run regress.
    As a result of reading previous questions on this forum, I have changed the format, but that still didn't result in the correct display of numbers in tables.

    Please note that this is my first time using Stata, and I have already tried to find different solutions to my problem. I really hope you can help me with this display problem.

    Merel

  • #2
    This kind of question comes up now and again. Stata has its own rules on how it displays large numbers. For readability, if you divide the numbers by some amount and then state that the amounts are in terms of that value, do you lose anything?

    Code:
    . set obs 1
    number of observations (_N) was 0, now 1
    
    . gen x= 253000000000
    
    . sum x
    
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
               x |          1    2.53e+11           .   2.53e+11   2.53e+11
    
    . replace x = x/1e+6
    (1 real change made)
    
    . sum x
    
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
               x |          1      253000           .     253000     253000
    Here, I would say that "x" is in millions. We say that the population of India is approximately 1.3 billion...we don't need to write this as 1300000000.
    Last edited by Andrew Musau; 29 May 2018, 05:23.

    Comment


    • #3
      Thank you very much, Andrew.
      This helped in running regress. In summary statistics I still get exponential numbers, of which I do not understand the reason. Luckily I can get the summary statistics from Excel and use the smaller numbers for the rest of my analysis in Stata. Thanks again.

      Comment


      • #4
        From #1, your range is too big. In effect, if the values in #1 are actual dollar amounts, what you are saying is that the smallest cap firm is valued at 53 cents while the largest cap firm is valued at 717 million dollars. If you express the values in millions of dollars, the smallest cap firm is worth nothing.


        Code:
        . gen x= .5318 in 1
        (1 missing value generated)
        
        . replace x= 7.17e+08 in 2
        (1 real change made)
        
        . sum x
        
            Variable |        Obs        Mean    Std. Dev.       Min        Max
        -------------+---------------------------------------------------------
                   x |          2    3.59e+08    5.07e+08      .5318   7.17e+08
        
        . replace x = x/1e+6
        (2 real changes made)
        
        . sum x
        
            Variable |        Obs        Mean    Std. Dev.       Min        Max
        -------------+---------------------------------------------------------
                   x |          2       358.5    506.9956   5.32e-07        717
        
        
        di %12.8f 5.32e-07
          0.00000053

        Comment

        Working...
        X