Announcement

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

  • Regression results displayed in scientific notation

    Click image for larger version

Name:	_20230819180136.png
Views:	1
Size:	797.8 KB
ID:	1724329 Click image for larger version

Name:	_20230819180125.png
Views:	1
Size:	19.6 KB
ID:	1724328 When I conduct regression analysis, the coefficients and confidence intervals on the regression results interface are both displayed in scientific notation. However, in the reference book, specific values are displayed normally. Is there any method to make them display the values normally?

  • #2
    At a guess the problem lies in your choice of currency units for income. Scale by dividing by 1000 or 1 million or some other convenience factor.

    Alternatively, income as response variable often makes less statistical (or even economic or financial) sense than log of income. An important detail here is whether your model makes any negative predictions (unless naturally you have some negative values).

    Comment


    • #3
      See

      Code:
      help set cformat
      Most likely, you have a fixed format at present. Consider:

      Code:
      di %9.3f -12419.2412345
      di %9.3f 2412.33912345
      Res.:

      Code:
      . di %9.3f -12419.2412345
      -1.24e+04
      
      .
      . di %9.3f 2412.33912345
       2412.339
      A general format will give you the wanted result:

      Code:
      di %10.7g -12419.2412345
      di %10.7g 2412.33912345
      Res.:

      Code:
      . di %10.7g -12419.2412345
       -12419.24
      
      .
      . di %10.7g 2412.33912345
        2412.339

      Comment


      • #4
        Showing us the results of something like

        Code:
        scatter realrinc age, by(female) mc(blue%10)
        would be illuminating.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          At a guess the problem lies in your choice of currency units for income. Scale by dividing by 1000 or 1 million or some other convenience factor.

          Alternatively, income as response variable often makes less statistical (or even economic or financial) sense than log of income. An important detail here is whether your model makes any negative predictions (unless naturally you have some negative values).
          "Thank you for your response! As I am a beginner, I followed the original data from the book and ran the commands as instructed in the book. The original data did not involve any scaling of the income variable, so the results obtained should correspond to those in the book."

          Comment


          • #6
            Originally posted by Nick Cox View Post
            Showing us the results of something like

            Code:
            scatter realrinc age, by(female) mc(blue%10)
            would be illuminating.
            Click image for larger version

Name:	_20230819201849.png
Views:	1
Size:	95.0 KB
ID:	1724345

            Comment


            • #7
              Originally posted by Andrew Musau View Post
              See

              Code:
              help set cformat
              Most likely, you have a fixed format at present. Consider:

              Code:
              di %9.3f -12419.2412345
              di %9.3f 2412.33912345
              Res.:

              Code:
              . di %9.3f -12419.2412345
              -1.24e+04
              
              .
              . di %9.3f 2412.33912345
              2412.339
              A general format will give you the wanted result:

              Code:
              di %10.7g -12419.2412345
              di %10.7g 2412.33912345
              Res.:

              Code:
              . di %10.7g -12419.2412345
              -12419.24
              
              .
              . di %10.7g 2412.33912345
              2412.339
              Thank you for your response! Is there any way to directly restore the specific values in the regression results?

              Comment


              • #8

                I don't know the book in question but to me the plot in #6 raises serious questions about the analysis. Please give a reference in standard style following https://www.statalist.org/forums/help#references, i.e. authors, title, edition and date, publisher, etc.

                Andrew Musau is indicating that you can change display formats and you need to do that if the task is exact reproduction. See the help for estimation options for options like cformat().

                Comment


                • #9
                  Originally posted by Nick Cox View Post
                  I don't know the book in question but to me the plot in #6 raises serious questions about the analysis. Please give a reference in standard style following https://www.statalist.org/forums/help#references, i.e. authors, title, edition and date, publisher, etc.

                  Andrew Musau is indicating that you can change display formats and you need to do that if the task is exact reproduction. See the help for estimation options for options like cformat().
                  "Thank you very much for your guidance! The specific reference information is Mitchell, M. N. (2012). Interpreting and visualizing regression models using Stata (Vol. 558). College Station, TX: Stata Press. The specific chapter is 3.5 Main effects with polynomial terms on page 107."

                  the display formats is a good way to reproduction

                  Comment

                  Working...
                  X