Announcement

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

  • svy: tab command displaying period in string as comma

    Hi,

    I haven't had any luck searching statalist, as it keeps sending me to destring-related queries.

    I am analyzing survey data using STATA 14 and I have a string value with periods in it (e.g. "5.5 months"). When I try to run -svy: tab-, it replaces the periods with commas. Is there a formatting command or option that I am missing?

    svy: tab incl_age, percent format(%4.1f) stubwidth(20)

    Sample output:
    ---------------------------------
    7. Age | percentage
    ---------------------+-----------
    5,5 months | 2.1

    Thanks in advance for any suggestions you can provide!

    Ainslie

  • #2
    That should not happen. Can you give us the result of desc incl_age
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi Maarten,

      . desc incl_age

      storage display value
      variable name type format label variable label
      -----------------------------------------------------------------------------
      incl_age long %11.0g incl_age_lbl
      7. How old is your youngest
      baby/child?

      I apologize for being unclear earlier, it is not a string variable, it's an encoded long variable with a label, as follows:

      . lab list incl_age_lbl
      incl_age_lbl:
      3 5.5 months
      4 6 months
      5 6.5 months
      6 7 months
      7 7.5 months
      8 8 months
      9 8.5 months
      10 9 months
      11 9.5 months
      12 10 months
      13 10.5 months
      14 11 months
      15 11.6 months
      16 11.5 months

      Thanks,
      Ainslie

      Comment

      Working...
      X