Announcement

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

  • Logistic regression with correlated data

    I have data on a whether a patient has been treated or not and two pathologists have retrospectively gone through the notes and scored various pathologies with the aim of seeing if the pathology is related to treatment. There are 78 patients.
    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float treat byte(p11 p21 p12 p22 p13 p23 p31 p32)
    0 1 1 1 1 2 2 1 1
    1 4 4 1 1 3 3 5 5
    1 2 2 3 1 3 3 4 4
    1 3 3 3 1 3 3 5 5
    1 2 3 1 1 2 2 4 4
    1 4 4 3 3 3 3 5 5
    0 1 1 1 1 2 2 1 1
    0 1 1 1 1 2 2 2 2
    0 1 1 2 1 3 3 3 2
    1 4 4 2 2 4 3 5 5
    1 3 3 3 3 3 3 4 3
    1 4 4 1 1 3 3 5 5
    0 3 3 2 2 2 2 2 2
    1 2 3 2 2 3 2 4 3
    1 4 4 1 1 3 3 5 5
    1 4 4 2 2 4 4 5 5
    1 4 4 1 1 3 3 5 5
    0 1 2 1 1 2 2 2 2
    0 2 2 1 1 2 2 2 2
    1 4 4 2 2 3 3 5 5
    1 4 4 3 3 2 3 5 5
    0 1 1 1 1 2 2 2 2
    0 1 1 1 1 2 2 2 2
    1 4 4 2 2 3 3 4 4
    1 4 4 1 1 4 4 4 4
    end
    ----------

    p11 is pathologist 1 pathology 1, p21 pathologist 2 pathology 1 etc.

    I would expect there to be some correlation between p11 and p21 etc as the pathologists are measuring the same thing.

    If I run a logistic regression

    logit treat i.p11 i.p21 i.p21 i.p22 i.p31 i.p32

    1. It does not allow for this correlation
    2. It does not converge

    Is there any way that I can allow for the correlation in this type of model or do I need to go to sem / gsem?

    Thank you.
    Eddy

  • #2
    conditional logit? I am not sure but might worth exploring

    Comment


    • #3
      Another option is to use generalized estimating equations (GEE) to account for the correlated nature of the paired data. The book by Vittinghoff et al. includes an example or two. There is also an example of a logit model in the help for -xtgee-.

      Code:
      * Setup
      webuse union, clear
      xtset id year
      * Fit a logit model
      xtgee union age grade not_smsa south, family(binomial) link(logit)
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        Thank you both for your suggestions. I will try them and see what happens.

        Eddy

        Comment

        Working...
        X