Announcement

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

  • Conditional logit estimator with microeconomic data

    Dear stata users,

    I'm a PhD student, trying to run a conditional logit estimation on stata with microeconomic data. I have macro data for conflicts per country per year, and micro data with surveys for around 10.000people per country per year (using Gallup world poll).

    I tried several things to conduct this regression:

    - clogit y x, group(o)
    with o being a numerical code for origin countries. This estimation gives me the error 1400 such as "5,996 (group size) take 1,297 (# positives) combinations results in numeric overflow; computations cannot proceed r(1400);"

    So I understood this was because there were multiple observations for each combinations of country/year. Knowing that I have a lot of observations per combinations, I also tried:

    - xtset o year
    xtlogit y x, fe(o)

    The problem is when I try to xtset, (obviously) I have multiple observations per combinations of origin and year (survey), so I have an error message. And I cannot drop duplicates in terms of conflicts at the year/country level, since it would drop me the microeconomic data.

    I tried to be as clear as possible, I hope it will be enough.
    Do you know a way to tell stata I am using panel data at the country/year level, while still keeping multiple observations per country/year combinations?

    Thank you in advance,
    Best,
    Killian Foubert

  • #2
    Killian:
    if you do not plan to use time-series related commands, such as lags an leads, you can simply -xtset- your data with the -panelvar- only:
    Code:
    xtset panelid
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Killian:
      if you do not plan to use time-series related commands, such as lags an leads, you can simply -xtset- your data with the -panelvar- only:
      Code:
      xtset panelid
      Thank you for the answer. I was actually planning to use lags though, what would it change regarding the code you gave me?

      Thanks again,
      Killian

      Comment


      • #4
        Killian:
        hence you have to -xtset- your data with -timevar-, too.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Killian:
          hence you have to -xtset- your data with -timevar-, too.
          EDIT: I checked the help file on stata, I understood your message, sorry.

          Thank you again for your help
          Last edited by Killian Foubert; 10 Feb 2019, 03:29.

          Comment

          Working...
          X