Announcement

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

  • Possible bug in -reshape-

    I am encountering an error when using -reshape- with 'favor(speed)' when subsetting j. Using 'favor(memory)' works as expected which leads me to suspect a bug? Running on Windows/MP18.5 (revision 2024-12-18).)

    Silly example:
    Code:
    sysuse bplong.dta, clear
    reshape wide bp, i(patient) j(when 2) favor(speed)
    This throws the following error:
    Code:
    _reshape_df::increment_j():  3301  subscript invalid
    Last edited by Robert Ulbricht; 14 Jan 2025, 16:16.

  • #2
    Thank you for providing a minimal example. We will look into this and hopefully fix it soon.

    Comment


    • #3
      This does seem to be a bug. I can replicate the findings reported in #1 on my setup. (Windows 10, Stata MP4 version 18.5)
      Interestingly, if you list out all of the values of the -j()- variable, then the code does not throw an error. Similarly, if you first -keep if inlist(bp, 138, 141)- and run the code exactly as shown in #1, you also get no error. But it does seem that the -favor(speed)- version is not recognizing partial subset lists correctly.

      Added: Crossed with #2.

      Comment

      Working...
      X