Announcement

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

  • Bug in _parsewt?

    The following gives error

    Code:
    . clear
    
    . set obs 10
    number of observations (_N) was 0, now 10
    
    . gen x = _n
    
    . gen w = _n
    
    . xtile z = (x) if 1 [fw = w]
    unknown function ()
    r(133);
    I think it is due to a bug in _parsewt, which xtile uses to parse weights before parsing the rest of the syntax. For example:

    Code:
    . _parsewt "fweight" z = (x) if 1 [fw = w]
    
    . disp `"`s(newcmd)'"'
    z = (x)if 1
    I'm on Stata 15.1; from "viewsource xtile.ado" I have version 3.1.9 17nov2017; from "viewsource _parsewt.ado" I have version 2.0.5 11feb2015.

  • #2
    Mauricio found a bug in xtile. We will have it fixed in a future update; in the meantime the workaround is to rearrange the syntax as follows.

    Code:
    xtile z = log(x) [fw = w] if 1

    Comment


    • #3
      This bug has been fixed in yesterday's update.

      Comment

      Working...
      X