Announcement

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

  • diagnostic test accuracy measures

    I have a dataset that measures cancer (d), PSA level (psa), and test positive/negative (tp). A PSA>4 correlates to a positive test result, and all other PSA values correlate to a negative test result. cancer (d) is a binary qualitative variable, either yes or no.

    I am wondering how to calculate diagnostic test accuracy measures to fill out this table
    criterion standard criterion standard
    Abnormal Normal Total
    test result Positive (PSA>4) TP FP T+
    test result Negative (PSA<4) FN TN T-
    total D+ D- n
    TP=true positive
    FP=false positive
    FN=false negative
    TN=true negative
    Last edited by Eve Martin; 13 Sep 2018, 13:57.

  • #2
    Code:
    label define pos_psa 0 "Negative" 1 "Positive"
    gen byte pos_psa:pos_psa = (psa > 4 & !missing(psa))
    
    tab pos_psa d
    And if you add the -col- option to the -tab- command you will get the sensitivity and specificity. And if you add the -row- option to the -tab- command you will get the positive and negative predictive values. You didn't ask for those, but I imagine getting those is your next step.

    Comment

    Working...
    X