Announcement

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

  • Rounding down every output to integral numbers

    Dear Stata-Friends,

    while working with a panel data set i try to drop the last decimal of output. The following extract of a do-file should give an overview of what i try to do:

    .use "xx"

    .sort pgkldb92

    .drop if pgkldb92 <1 %drop missings

    gen pgkldb_short1 = pgkldb92/10

    -> and now i would like to round down every output to integral numbers!

    It would be great if you could help me in this stata-problem.

    Thank you very much and kind regards from Cologne!


  • #2
    Code:
    gen pgkldb_short1 = floor( pgkldb92/10 )
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you!! It worked

      Comment

      Working...
      X