Announcement

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

  • Command for a (longitudinal) multilevel model where the outcome is a proportion (aggregated binary data)

    Hi:

    I have a query on multi-level modelling for an outcome that is a proportion. Here are some details -

    The outcome is a proportion (i.e. aggregated binary outcome) at country-level, for which I have a short time-series of data for a number of countries. I want to fit a (multi-level) longitudinal ‘growth curve’ model (i.e. principle predictor is year of observation), where level 1 is occasion (i.e. year) of observation and level 2 is country.

    As a prelim, I’ve fitted the model assuming the outcome is continuous:

    mixed x y || country:

    where x is the outcome, y is year of measurement, and country is country id. (The model includes other predictors but I have left them out for simplicity).

    But, it’s preferable to fit the model so the outcome is a proportion (using a binomial distribution) rather than as a continuous variable. However, I’ve been unable to find out what the correct Stata command is…

    Apparently a single-level model where the outcome is a proportion would be of the form:

    binreg x y, n(z)

    where x is the outcome specified as a count (i.e. as the numerator of the proportion rather than a proportion), y is year, and z is the denominator of the proportion.

    And, a multilevel model where the binary outcome is specified at the individual level would be of the form:

    xtmelogit x y || country:

    But I’m not sure what command I should use when the outcome is a proportion and I require a multilevel model. (I guess I could arbitrarily disaggregate the data to the individual level but this would be messy and I assume there’s an easier way).

    If anyone is able to offer any advice I’d be grateful.

    Thanks.

  • #2
    Sid:
    Volume 2, Chapter 5 of http://www.stata.com/bookstore/multi...ata/index.html covers what you're after.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Thanks for the response Carlo. I've got the two volumes by Rabe-Hesketh, but they don't seem to spend much time on what I'm looking for. Vol II p687 very briefly discusses counts vs proportions in MLMs. It suggests I could use 'xtmelogit' with the binomial option to specify the denominator. The chapter doesn't discuss proportions any further.

      Maybe this is all the info I need though. But I don't want to mess this up. Is any one able to confirm that it would be correct to use a model of the form:

      xtmelogit x y || country: , binomial ( ...)

      where x is the outcome of interest specified as the numerator of the proportion, y is year of observation, country is country id, and binomial specifies the variable holding the denominator of the proportion.

      Thanks for the help.

      Comment


      • #4
        Hello Sid,

        Besides Carlo's advice, you could also check these texts:


        http://www.ats.ucla.edu/stat/stata/faq/proportion.htm

        http://www.theanalysisfactor.com/pro...type-of-model/


        Best,

        Marcos
        Best regards,

        Marcos

        Comment


        • #5
          Hello Sid,

          I was about to "test" if what happens with - glm - would "work" (I mean, provide reliable results) with - meglm - in your specific case when, lo and behold, I came across this thread (http://www.statalist.org/forums/foru...lts-of-melogit).


          Best,

          Marcos

          Best regards,

          Marcos

          Comment


          • #6
            Thanks a lot for this Marcos - much appreciated. I'll check it out.

            Comment

            Working...
            X