Announcement

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

  • Is it possible to combine meologit with nested regression (nestreg)?

    I would like to combine meologit with a nested regression - I have tried to combine meologit with nestreg but it is not supported. I have tried to find a solution online but have so far failed. Does anyone know if there is a way to go about this? e.g. in the code below to run meologit with var1&2, then to repeat with all vars?

    Code:
      meologit happy var1 var2 var3 var4 ||communityname:
    all variables have three ordered levels e.g, not at all, some, always

    Many thanks in advance for any advice on this,
    Lisa

  • #2
    Code:
    local vars var2 var3 var4 
    local v
    foreach var of local vars{
        local v `v' `var'
        meologit happy var1 `v' ||communityname:
    }

    Comment


    • #3
      Thanks so much for your response Andrew! Is there a way to run the look so it adds all the variables in 'local' at once? Right now it is giving me a model for (i) var1, (ii) var1+var2, (iii) var1+var2+var3 etc.

      Ideally, I would like to have a model for var1, and a model for var1+var2-4. I have simplified the variables for the forum as there are quite a lot more so I'm aware this might look a bit strange!

      Thanks again

      Comment


      • #4
        Sorry, I have now sorted it

        Code:
        local vars var2 var3 var4
        meologit happy var1
        meologit happy var1 `vars'
        Thanks for your direction Andrew!

        Comment

        Working...
        X