Announcement

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

  • Logistic regression question

    I just wanted to check if what I am doing is ok.

    I have two dummy variables, biopsy_pos and op_pos. These are dichotomous variables based on whether a sample taken from a biopsy was positive (0, 1) and a sample taken during the operation was positive (0, 1). can I perform a logistic regression of these two variables to determine if the outcome of infection diagnosed at time of operation (op_pos) is dependant on the biopsy being positive (biopsy_pos)?

  • #2
    Yes, you can. But this may not be the best way to look at the association. You don't say specifically what your research question is. But typically in a situation like this we are interested in estimating the accuracy of the biopsy as a predictor of the operative result. For that purpose, an odds ratio or other logistic-regression statistic would not be of interest. More interesting would be the sensitivity and specificity of the biopsy result, which you can get very simply with:
    Code:
    tab biopsy_pos op_pos, col
    The sensitivity and specificity will be the column percentages in the main diagonal of the contingency table.

    If you would like to quantify the uncertainty in the sensitivity and specificity you could do that with:
    Code:
    ci proportion biopsy_pos if op_pos == 1 // SENSITIVITY
    ci proportion biopsy_pos if op_pos == 0 // 1 MINUS SPECIFICITY

    Comment


    • #3
      thank you so much this was really helpful. I also tried the following which gives the same output as your suggestion

      code
      [diagtest biopmicro_pos opmicro_pos]

      Comment


      • #4
        Are those the only variables you have? It would be interesting if, say, you could look at how accuracy differed by race, gender, or income.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://academicweb.nd.edu/~rwilliam/

        Comment

        Working...
        X