Announcement

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

  • clinical review in stata: clrevmatch

    Hi all,
    I've searched the forum for the command "clrevmatch" but could not find any open discussions.
    Have some of you used this command, how was the experience?
    I started to use it and think it is a great thing; however, somehow I get an error message when I try to input the clerical review indicator:

    [...]

    How would you describe the pair?
    crev2lbl:
    0 not match
    1 match
    2 likely match
    3 check hardcopy
    please enter a clerical review indicator:. 1
    1 is invalid

    The code I used for the labels is:

    local mylabel "0 "not match" 1 "match" 2 "likely match" 3 "check hardcopy" "
    clrevmatch using "DSM-reclink.dta", ///
    idmaster(pupil_num) idusing(entrynum) ///
    varM(npupil_name school_class sex age matokeo school district) ///
    varU(Upupil_name Uschool_class Usex Uage mRDT_result Uschool Udistrict) reclinkscore(myscore) ///
    clrev_result(crev2) clrev_note(crnote2) clrev_label(`mylabel') replace

    I also tried space1 1space 2 3 and so on..but always get the message "is invalid".

    Any suggestions?

  • #2
    Welcome to Statalist!

    Have you tried replacing
    Code:
    clrev_label(`mylabel')
    with
    Code:
    clrev_label(0 "not match" 1 "match" 2 "likely match" 3 "check hardcopy")
    I do not think it should make a difference, but at least it will remove one level of complexity.

    Added in edit:

    Aha, I read further in the output of help clrev and see that the author suggests your local command should be
    Code:
    local mylabel `"0 "not match" 1 "match" 2 "likely match" 3 "check hardcopy" "'
    rather than what you have. To understand the difference, read about double quotes in the output of help quotes.

    As a side note, to better present your code and output, you should review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. It's particularly helpful to copy commands and output from your Stata Results window and paste them into your Statalist post using CODE delimiters, as described in section 12 of the FAQ.
    Last edited by William Lisowski; 10 Feb 2016, 12:02.

    Comment


    • #3
      Thank you for you helpful answer William Lisowski.
      It was really just because of the quotation marks.
      I guess that happens to every "newbie" when coding.

      And thank you also for your side note, I will consider that in future posts!

      So now that's the output I get when I use it correctly:

      Code:
       local mylabel `"0 "not match" 1 "match" 2 "likely match" 3 "check hardcopy" "'
      and then

      Code:
        
      clrevmatch using "t2+t4-DSM-reclink.dta", ///
      idmaster(pupil_num) idusing(entrynum) ///
      varM(pupil_name school_class sex age mRDT_result) ///
      varU(Upupil_name Uschool_class Usex Uage UmRDT_result) ///
      reclinkscore(myscore) clrev_result(crev2) clrev_note(crnote2)  clrev_label(`mylabel') replace
      Gives me the output:

      File 1
      ------
      pupil_name: "some name"
      school_class: I
      sex: F
      age: 6
      mRDT_result: Negative
      ----------------------------------------------------------------------
      File 2
      ------
      Upupil_name: "similar name"
      Uschool_class: I
      Usex: F
      Uage: 7
      UmRDT_result: N
      match score: .7
      ----------------------------------------------------------------------
      How would you describe the pair?
      crev2lbl:
      0 not match
      1 match
      2 likely match
      3 check hardcopy
      please enter a clerical review indicator:. 1

      Press c if need to go back and change your answer
      n if any note to enter?
      otherwise, press enter to continue. n

      please enter note. check age

      [...]




      Comment

      Working...
      X