Announcement

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

  • 'goodness of fit' test of a conditional logistic regression model using an MI data set

    Dear Stat users,

    I am after some sage like advice. I have created a conditional logistic regression model using multiply imputed data. I can find many sources e.g. (http://www.ats.ucla.edu/stat/stata/w.../statalog3.htm) explaining how do undertake this will normal data but I can't find an approach with conditional logistic regression data using imputed data. Is checking 'goodness of fit' of the model possible with imputed data or am I barking up the wrong tree?

    Many thanks for your help

    Andrew

  • #2
    Although mi estimate: linktest doesn't work, you can do the same test by hand. Create the variables _hat and _hatsq defined on page 1239 of the Manual entry for linktest.

    Code:
    webuse lowbirth2, clear
    set seed 8621265
    replace ptd = . in 1
    mi set mlong
    mi register imputed ptd
    mi impute logit ptd =  c.age##smoke  ht , add(5)
    
    mi estimate, saving (miest, replace): clogit low lwt smoke ptd ht age  ui i.race, group(pairid)
    
    /* Create the predictors for -linktest- */
    mi predict _hat  using miest, xb
    mi predictnl  _hatsq = xb*xb using miest
    
    /* Do the link test (significance of _hatsq) */
    mi estimate: clogit low _hat _hatsq, group(pairid)
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Correction: the line
      Code:
      mi predictnl _hatsq = xb*xb using miest
      should be:
      Code:
      mi passive: gen _hatsq = _hat*_hat
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment


      • #4
        Thank you very much for your advice

        Comment


        • #5
          Dear Steve,

          Thank for your earlier help. Is it possible to run a Hosmer-Lemeshow goodness of fit test as well using a conditional logistic regression model using imputed data? I can't find any helpful information despite searching the forums / stata website.

          Many thanks

          Andrew

          Comment


          • #6
            You cannot run a Hosmer-Lemeshow test, as that is only for unconditional logistic regression. The HL test operates on expected probabilities of event. For conditional logistic regression, these are unknown, because the model omits the unobserved intercept for each individual. You can, however, expand the -linktest- idea, by adding interactions and non-linear terms to your model. In analogy with the Ramsey omitted variable test (post estimation tools for regress, p. 2165 Stata Reference Manual), you could add \(_hat^3\) and even \(_hat^4\) to the model. Then -test- for the joint significance of the added variables.
            Steve Samuels
            Statistical Consulting
            [email protected]

            Stata 14.2

            Comment


            • #7
              Thank you again for your advice

              Comment

              Working...
              X