Announcement

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

  • Moving decimal places

    I have a variable for BMI measurements, but it has two implied decimal places (e.g., 3161.96 = 31.6196). I need to move that decimal up but am having trouble with the format command as I haven't really used it in the past. The variable simply lists every person's BMI in the above-noted format. Thanks in advance.

  • #2
    Welcome to Statalist, Mike.

    Formatting only affects the display of the number and not how it is stored internally in Stata and used in calculations. For what you need, something like the following might point you in a useful direction.
    Code:
    generate BMInew = BMI/100
    format BMInew %9.4f

    Comment


    • #3
      Thank you so much! Worked like a charm.

      Comment

      Working...
      X