Announcement

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

  • Problem with date variable formatting and xtdes

    Here's a reproducible example of what I believe is a bug in Stata 14.2 (and perhaps others). When I use the single quote in tw date display format to shorten year, xtdes produces a cryptic error:

    Code:
    cls
    clear
    input id week
    1 2964
    1 2965
    2 2964 
    2 2965
    end
    format week %tw
    list
    xtset id week, weekly
    xtdes
    format week %tw!'YY_WW
    xtdes
    This produces:

    Code:
    . xtdes
    
          id:  1, 2, ..., 2                                      n =          2
    too few quotes
    too few quotes
    { required

  • #2
    I get the same result in Stata 15.1 MP2 (Windows 64 bits).

    Comment

    Working...
    X