Announcement

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

  • Calculate sensitivity/specificity

    Hi,
    I have two variables: ”truth” (binary variable: whether a person is sick or healthy) and “prediction” (binary variable: prediction of whether the person is sick or healthy).
    I want to calculate sensitivity and specificity of the predictions.

    So far I’ve used the ‘diagt’ command, but this only outputs one decimal, and I’d like 2-3 decimals.

    Can somebody help with a way to either 1) get the diagt command to output more decimals, or 2) another (simple) way to calculate sensitivity/specificity (with at least 2 decimals)?


    Thanks!

  • #2
    If you want a simple way to calculate them to 2 decimal places:

    Code:
    tab prediction truth, col
    The sensitivity and specificity will be the on-diagonal percentages. And -tab- shows them two two decimal places.

    Comment

    Working...
    X