Announcement

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

  • what is the difference between logit and xtlogit?

    I am trying to build a model which will explore statin prescription (0/1), including a time point as a predictor (quarter0; quarter1), to see whether there is any significance in prescribing in the last financial quarter compared with the third quarter of 15_16. I would say a significant portion of my data is non-independent.

    Stata forums are guiding me towards these two commands - logit and xtlogit:


    Code:
    logit statins sex i.age_cats i.ethnicity  i.quarter  ckdcoded diabetes ht, cluster(usualgpsorganisationcode)

    Code:
    xtlogit statins sex i.age_cats i.ethnicity  i.quarter  ckdcoded diabetes ht, i(practice)
    ('practice' is equal to a numerical version of 'usualgpsorganisationcode')

    Will either of these models be able to account for the non-independent observations?

    Or would a multilevel model be a better option in this scenario?

    Thank you in advance for your time...awaiting a stata guru.

    Vian

  • #2
    If you have a panel data, i.e., if the measures concerning Yvar (you may add some predictors as well) are repeated in each individual for a given number of times, you may select xtlogit. If you have more than 2 levels, you may select melogit.

    If you have a cross-sectional data, i.e., if the measure concerning Yvar (as well as the predictos) is taken only once for each individual, you may select logit.

    Logically, the data set must be "shaped" accordingly.

    To end, typing - help - in the Stata's command window, followed by xtlogit, melogit and logit, respectively, will provide interesting information as well as examples.
    Last edited by Marcos Almeida; 02 May 2018, 09:43.
    Best regards,

    Marcos

    Comment


    • #3
      Thank you Marcos - this has been very helpful

      Comment

      Working...
      X