Announcement

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

  • Panel Data for Directed-Dyad Year

    Hello,

    I have a dataset that I'm working with that uses a directed-dyad year unit of analysis:

    Code:
    input float(ccode1 ccode2 year)
    2 800 2000
    800 2 2000
    2 58 2000
    58 2 2000
    Ccodes = country codes. So, there are digits assigned to countries. In this case, for example, 2 is United States and 800 is Thailand. There's a probability that the data may have heteorskedasticity. I'm still not sure what regression to use, but I may have to use GLS (again, I'm not sure about this. My DV is a percentage 0-100. But I believe it is neither censored nor truncated). How do I tell stata to use panel data when the unit of analysis is directed dyad? I never had this problem before, because my unit of analysis used to be country-year. So, that was rather easy. I can't use both country codes and year, because xtset won't allow it (too many variables). xtest with ccode1 and year just yields to "repeated time values within panel."

    I appreciate any leads.

    Regards,
    MW

  • #2
    On the percent side, you should be thinking of some fractional regression. See e.g. http://www.stata-journal.com/sjpdf.h...iclenum=st0147 for a friendly introduction.

    On the panel side, I am a little queasy because e.g. (US. Mexico) and (Mexico, US) seem linked more than say (US, Mexico) and (France, Germany). Statistically, that is. But others may be able to comment more, because this is a standard applied economics question (and I am not an economist).

    You would need to try

    Code:
    egen dyad = group(ccode?) 
    xtset dyad year

    xtgee I imagine to be the first port of call here.
    Last edited by Nick Cox; 17 Feb 2017, 08:22.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      On the percent side, you should be thinking of some fractional regression. See e.g. http://www.stata-journal.com/sjpdf.h...iclenum=st0147 for a friendly introduction.

      On the panel side, I am a little queasy because e.g. (US. Mexico) and (Mexico, US) seem linked more than say (US, Mexico) and (France, Germany). Statistically, that is. But others may be able to comment more, because this is a standard applied economics question (and I am not an economist).
      Hi Nick,
      Thanks for the quick reply. Indeed. These data "fall" under political science. Past research has used panel data. But I noticed they don't talk about the possibility of similar dyads. I think I read somewhere about clustering around dyads as a result, though I'm not sure at all how to begin to go about it. The percent side may be "continuous." Very few studies have used the DV that I'm using. One used Tobit. Though, I'm not sure if it is censored per se.

      Comment


      • #4
        The paper cited explains, if I recall correctly, why Tobit is the wrong idea. Its popularity seems to be a matter of someone having that idea and then others assuming that the first person had a good solution.

        There is no question of censoring or truncating if data are naturally bounded, just as binary outcomes (present, absent; alive, dead) are not censored or truncated. Being continuous is not an issue either so long as the error structure is handled carefully.

        I'd expect there to be more experience here among some of the economists about the best kind of panel data for this kind of set-up, but I am not trying to be tribal. I am not a political scientist either.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          The paper cited explains, if I recall correctly, why Tobit is the wrong idea. Its popularity seems to be a matter of someone having that idea and then others assuming that the first person had a good solution.
          That explains it right there!

          Hopefully some economist will reply in the future. I was reading a lot about clustering around the dyads this afternoon, but it just put my mind in a frenzy.

          If it helps anyone, I did come across avoiding clustering around standard errors, as it will fail to account for inter-dyad correlation. But instead, to consider non-parametric sandwich estimator for dyadic clustering.

          Referenced here: http://www.academia.edu/24597589/Clu...or_Dyadic_Data

          Comment


          • #6
            Originally posted by Nick Cox View Post
            The paper cited explains, if I recall correctly, why Tobit is the wrong idea. Its popularity seems to be a matter of someone having that idea and then others assuming that the first person had a good solution.

            There is no question of censoring or truncating if data are naturally bounded, just as binary outcomes (present, absent; alive, dead) are not censored or truncated. Being continuous is not an issue either so long as the error structure is handled carefully.

            I'd expect there to be more experience here among some of the economists about the best kind of panel data for this kind of set-up, but I am not trying to be tribal. I am not a political scientist either.
            Nick,
            Since there have been no other responses, I just wanted to say that (hopefully it will help someone as well), from what I gathered as I was reading over the weekend, I believe panel data can be used with dyads as long as the proper procedures to account for the standard errors in the dyad has been thought through.

            On the percent side, you should be thinking of some fractional regression. See e.g. http://www.stata-journal.com/sjpdf.h...iclenum=st0147 for a friendly introduction.
            I did have a question that stemmed when I was reading the friendly introduction. The DV that I'm working with is skewed with a lot of zeros or near-zeros. I'm not sure what's the proper way to go about this with a DV that's a percentage. The most I ever worked with zeros was with count data.

            Comment


            • #7
              I don't think skewness is a major issue here.

              Comment


              • #8
                Originally posted by Nick Cox View Post
                I don't think skewness is a major issue here.
                Hm. Interesting. Thanks!

                Comment

                Working...
                X