0

I am assessing sensitivity/specificity in my data using package epi r.

There are missing values but when I make the table and then run the analysis the n includes all cases (should be 452 not 545), and does not account for the missing values.

How can I exclude missing values from my data table or in epir?

Tried na.omit in my table did not work, is there a single step do to this without having to make a new data frame?

table(utox_1$Delivery_pos_neg)
table(utox_1$PPAggregate_cat)

table_PP_ana <- table(utox_1$PPAggregate_cat, utox$Delivery_pos_neg)


del_pp_test_ana <- epi.tests(table_PP_ana, conf.level = 0.95)
del_pp_test_ana
mcnemar.test(table_PP_ana) 

Output

  0   1 
399  53 

  GE 1 Aberrant PP no abberant PP use 
               135                410 

Point estimates and 95 % CIs:
---------------------------------------------------------
Apparent prevalence                    0.25 (0.21, 0.29)
True prevalence                        0.90 (0.87, 0.93)
Sensitivity                            0.22 (0.19, 0.26)
Specificity                            0.51 (0.37, 0.65)
Positive predictive value              0.81 (0.73, 0.87)
Negative predictive value              0.07 (0.04, 0.09)
Positive likelihood ratio              0.45 (0.33, 0.62)
Negative likelihood ratio              1.53 (1.17, 2.00)
---------------------------------------------------------

    McNemar's Chi-squared test with continuity correction

data:  table_PP_ana
McNemar's chi-squared = 309.87, df = 1, p-value < 2.2e-16
NelsonGon
  • 13,015
  • 7
  • 27
  • 57

0 Answers0