Announcement

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

  • e+ in summarize command

    Hi everyone,

    I have a problem in presenting the results of summarize command
    The mean is shown as 8.14e+08, it should be 814,156,339, but it shows the output as 814000000. I tried the format and did not work

    Thanks

  • #2
    Code:
    . di %9.0g 814156339
     8.14e+08
    
    . di %9.0f 814156339
    814156339
    
    . di %12.0g 814156339
       814156339
    Perhaps this starts you in a useful direction. if you want more specific advice, then I urge you to read the FAQ on how to ask questions here. In particular, saying something "doesn't work" is not diagnostically useful. Show us an example of the data you are using, and the code you are running and what you want as output. Please also use [CODE] delimiters as I have used here to nicely format data examples (-dataex-) and code.
    Last edited by Leonardo Guizzetti; 01 Jun 2022, 08:42. Reason: edit: forgot some output

    Comment


    • #3
      8.14e+08 is also 814 million with nothing else said. As Leonardo Guizzetti advises you can change the display format. Alternatively, or additionally, you may find that dividing by 1 million gets you easier output.

      Comment


      • #4
        I second the division suggestion. Just divide by a million and do lab var x "Dollars (in millions)"

        and call it a day. In all honesty, that's more intuitive to me than 8 to the 8th power will ever be.

        Comment


        • #5
          Many thanks for the reply

          The command I have applied is [summarize SDG13_CO2_emissions]. The result is shown as 8.14e+08, when I copy it to excel it is shown 814000000. Still the correct mean value is 814156339.

          Comment


          • #6
            do
            Code:
            su var
            
            
            loc val = r(mean)
            
            di %12.0g `val'

            Comment


            • #7
              When I see the word "intuitive" I translate as "familiar to me" and it usually fits.

              Strictly, 8e+8 is 8 times 10 to the power 8. I guess that strengthens the idea, with which I concur, that this notation is not widely familiar. Only today in my day job I encountered the idea that it implies 8 exp(8), which is not true either.

              Comment


              • #8
                Originally posted by Fairouz Mustafa View Post
                Many thanks for the reply

                The command I have applied is [summarize SDG13_CO2_emissions]. The result is shown as 8.14e+08, when I copy it to excel it is shown 814000000. Still the correct mean value is 814156339.
                The default formatting defaults to scientific notation when the actual number is larger than the allotted width of the display, which is why if you copy this number directly to Excel, it only shows you 814 million. The underlying calculation however has correctly preserved the full precision of that calculation. Jared Greathouse has shown you how to access that value and re-display it with a more appropriate display format. Note that you can also type -return list- immediately after many Stata commands to see what values are returned (and likewise, -ereturn list- after estimation commands).

                Comment


                • #9
                  Jared Greathouse got solved

                  Many thanks for all comments, you helped me alot

                  Comment

                  Working...
                  X