Announcement

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

  • #16
    Hi all - Andrew Musau you'll probably be amused to know that multiple people have copied your code here verbatim and submitted it as part of a code test that we administer for prospective employees here. To anyone Googling for and reading this thread or any others like this out of left field about the Elixhauser package, we are glad you're using StataList and other resources to learn new techniques, but you're forewarned that if you copy the exact code, you should understand what it does and know that we're aware where you got it from.

    Comment


    • #17
      #11 and #16 As the values() option takes a numlist argument the code can be slimmed to

      Code:
      egen tag2= anymatch(procedure*), values(3500/3519)  
      
      bys patientid: egen CABG_excluded = max(tag2)
      Zach Adams will probably offer employment to anyone who cuts that down to one line.

      Comment


      • #18
        Originally posted by Nick Cox View Post
        #11 and #16 As the values() option takes a numlist argument the code can be slimmed to

        Code:
        egen tag2= anymatch(procedure*), values(3500/3519)
        
        bys patientid: egen CABG_excluded = max(tag2)
        Zach Adams will probably offer employment to anyone who cuts that down to one line.
        As always, Nick Cox, your input is insightful and appreciated - thanks for the good laugh to start my day, my colleagues will love this 😂

        Comment


        • #19
          That is something Zach Adams. Maybe you should be administering the test in real time with monitors, but good that you are able to detect cheating if it happens!

          Nick Cox, thanks for the tip. That takes care of one range of values, but hopefully StataCorp can make it such that one can use the inlist() and inrange() functions within values().

          Comment


          • #20
            Originally posted by Andrew Musau View Post
            That is something Zach Adams. Maybe you should be administering the test in real time with monitors, but good that you are able to detect cheating if it happens!

            Nick Cox, thanks for the tip. That takes care of one range of values, but hopefully StataCorp can make it such that one can use the inlist() and inrange() functions within values().
            Oh it's no big deal like that, it's a short test we send applicants. If people cheat on the homework they probably won't do super well on the team. And I'm amused you mention that, I'm a fan of Nick's Tips #39 and #51 and treat them as gospel!

            Comment


            • #21
              Thanks for the fan comments. Perhaps not the right point to flag that Stata Tip #51 https://journals.sagepub.com/doi/pdf...867X0700700312 is largely superseded by rangestat (SSC).

              Comment

              Working...
              X