Hello all,
I have a dataset including 4 columns as (TP, TN, FP, and FN), which means the researcher identified these metrics based on their clinical knowledge. Based on this, I can calculate sen, spe, PPV, NPV, accuracy, etc directly using the code below:
proc sql;
create table tmp1 as select sum(TP) as TP, sum(TN) as TN, sum(FP) as FP,
sum(FN) as FN, sum(tntp) as tntp, sum(fnfp) as fnfp
from tmp; quit;
proc sql;
create table tmp2 as select TP/(TP+FN) as sensitivity, TN/(TN+FP)as specificity,
TP/(TP+FP) as PPV, TN / (TN+FN) as NPV, (tn+tp)/(tn+tp+fn+fp) as accuracy
from tmp1; quit;
I think there is another way to get these metrics using proc freq, but not sure how to sort out as I don't have the column as an actual values to include "actual*predicted" in proc freq.
Could you please help me to figure out what is the SAS code to get the Confidence Interval for all the metrics, sen, spe, PPV,NPV, accuracy, etc
Thank you!
... View more