Announcement

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

  • Viewing the formula used to calculate the thresholds in roctab

    Hi there

    I am trying to derive a clinical prediction rule using multiple logistic regression.


    Code:
    xi:  logit cass_positive ct_min_ovrl tbscore hiv  tb_rx_48 ave_pcf_200 i.final_tb_type_class_no_unknowns  if culture_result ==1 & xpert_mtb_ovrl ==1 & valid_xpert_and_ct_min ==1, or
    
    predict cass_cpr, xb
    
    roctab cass_positive cass_cpr  if culture_result==1 & xpert_mtb_ovrl==1 & valid_smear_status_ovrl_with_que ==1, detail
    This creates an output that looks like this

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	17.3 KB
ID:	1458221


    How can I view formula used to calculate the cut-point column value?

    Is there also a way to see the numerators and denominators used to calculate sensitivity and specificity?

    Thank you


  • #2
    unless you are using a very old version of Stata (in which case you should tell us - see the FAQ), you should not use "xi"; see
    Code:
    help fvvarlist
    you can look at the roctab code to see what is doing:
    Code:
    view roctab.ado, adopath

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      unless you are using a very old version of Stata (in which case you should tell us - see the FAQ), you should not use "xi"; see
      Code:
      help fvvarlist
      you can look at the roctab code to see what is doing:
      Code:
      view roctab.ado, adopath
      Thanks Rich.

      Interpreting the code is unfortunately completely beyond my knowledge. I had presumed that the formula used to calculate each patients cut-point value was the sum of the coefficient of each variable in logit multiplied by the variable's value, plus the constant, but this doesn't appear to be true. Is there no way to view the formula used to calculate each patients' score after logit?

      Comment


      • #4
        I'm confused - I think I mis-interpreted your original question - the various cutpoints are, according the help file, chosen as follows:
        detail outputs a table displaying the sensitivity, specificity, the
        percentage of subjects correctly classified, and two likelihood
        ratios for each possible cutpoint of classvar.
        does this answer your question?

        Comment


        • #5
          Originally posted by Rich Goldstein View Post
          I'm confused - I think I mis-interpreted your original question - the various cutpoints are, according the help file, chosen as follows:

          does this answer your question?
          Not quite. I can see the cutpoint values for classvar (cass_cpr in my initial post) fine, but want to know the formula that is used to calculate the cass_cpr value for each patient after the logit command.

          Thank you for the help.

          Comment

          Working...
          X