Announcement

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

  • Using xtile for a subset of cases

    I tried to use xtile with the if statement, but received the message, "option if not allowed". Is there a workaround?

    Code:
    xtile risk_cat3=riskscore, nq(3) if sOTcat==1





  • #2
    Al:
    what if you impose a minor trick to your previous code?
    Code:
    xtile risk_cat3=riskscore if sOTcat==1, nq(3)
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo. Your code worked perfectly!



      Comment

      Working...
      X