Announcement

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

  • SVY and MELOGIT

    Dear Statalisters,

    I am analysing longitudinal data in long format from a complex survey design.
    Those in charge the data distribution suggest to handle them in this way:

    svyset psu [pweight=weightres4], strata ( strata ) singleunit(centered) (1)

    Weights are time-varying so, they vary for individuals and waves.

    So far, I ran a model of this type
    svy: logit y x

    but I wish I could use a random effect model to control for individual unobserved heterogeneity.
    xtlogit is not supported by svy.

    So I was wondering whether melogit could be used and in that case
    how to set model such that it considers the complex design in (1).

    In the end I think that the hierarchy of the levels should be:

    _n (t) <-- ID <--strata<-- psu
    .
    and the model this one:

    melogit y x [pweight=weightres4] ||pidnew: || strata: || psu:, or level(95)

    But I would like to have an opinion on whether this specification is correct,
    as computing this model and the margins from this model is quite long
    and I am not sure whether this specification is correct.

    Thank you and best,
    Lydia

  • #2
    I thought that I could use a variable considering psu and individual.

    egen psupid=group(psu pidnew)

    and svyset data in this way:

    svyset psupid [pw=weightres4] , strata ( strata ) singleunit(centered)

    Comment

    Working...
    X