Announcement

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

  • Fixed effects interaction with interaction between dichotomous and time-invariant

    Hello All, I have seen pieces of this question answered before but could not be certain. Thanks in advance.

    I am running a fixed effects model to test how the presence/absence of a housing institution (lagged) reduces cases of waterborne illness (through access to clean water). My theory suggests this institution will work in cities with higher civil society density. I am uncertain about how to calculate the full affect from the interaction and have gotten some contradictory advice. I want to test whether dichotomous, lagged adoption (l.houseyearm) has a greater effect in cities with higher civil society density (csoresid), which is time-invariant, standardized and centered on zero.

    Here is my code:

    Code:
    xtpoisson waterill l.houseyearm##c.csoresid $controls i.year, fe  vce(robust) irr
    A little about my data: I have 8 years and 851 cities per year.
    Here is my output for the interactions

    Code:
     waterill |               IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -----------------+----------------------------------------------------------------
        L.houseyearm |
    Adoption at t-1  |   .9839947   .0349816    -0.45   0.650     .9177662    1.055002
                     |
            csoresid |   1.229935   .2441128     1.04   0.297      .833564    1.814786
                     |
        L.houseyearm#|
          c.csoresid |
    Adoption at t-1  |   .9554095   .0160163    -2.72   0.007     .9245282    .9873223
    My interpretation:
    L.houseyearm is the effect of adoption when csoresid=0 (its mean value)
    csoresid is an increase in one standard deviation of csoresid when l.houseyearm=0
    L.houseyearm#c.csoresid is an increase in one standard deviation of csoresid when l.houseyearm=1

    What I am uncertain about is how to calculate the full effect of interest: the effect of adoption at high and very high levels of civil society density among adopters, because I read that margins will not work with fixed effects. Here are two efforts with lincom for high and very high csoresid, respectively.

    Code:
     lincom 1.l.houseyearm + 1*c.csoresid#1.l.houseyearm, irr
    waterill    IRR   Std. Err.    z    P>z    [95% Conf. Interval]
                    
        (1)    .9401178   .0330092    -1.76    0.079    .877597    1.007093
    
     
     lincom 1.l.houseyearm + 2*c.csoresid#1.l.houseyearm, irr
    waterill        IRR   Std. Err.    z    P>z    [95% Conf. Interval]
                            
        (1)    .8981975   .0377229        2.56    0.011    .8272231    .9752613
    Code:
    lincom 0*c.csoresid#1.l.houseyearm + 1*c.csoresid#1.l.houseyearm, irr
    waterill        IRR   Std. Err.    z    P>z    [95% Conf. Interval]
                            
        (1)    .9554095   .0160163        2.72    0.007    .9245282    .9873223
    
    lincom 0*c.csoresid#1.l.houseyearm + 2*c.csoresid#1.l.houseyearm, irr
    waterill        IRR   Std. Err.    z    P>z    [95% Conf. Interval]
                            
        (1)    .9128072   .0306043        2.72    0.007    .8547523    .9748053
    Do either of these sets provide the correct interpretation of the effect of adopting at different levels of civil society density among adopters? Or something else? Am I incorrect that margins will not provide the correct values with fixed effects? Thanks in advance!
    Last edited by David Ray McCoy; 19 Oct 2017, 00:49. Reason: I added tags.

  • #2
    L.houseyearm is the effect of adoption when csoresid=0 (its mean value)
    csoresid is an increase in one standard deviation of csoresid when l.houseyearm=0
    These are correct, with "effect" understood to be measured as an incidence risk ratio.

    L.houseyearm#c.csoresid is an increase in one standard deviation of csoresid when l.houseyearm=1
    No, that's not right, or at least not if I understand what you are getting at.. The "IRR" for this interaction term is not actually a risk ratio, it is a ratio of risk ratios. So the IRR associated with a 1sd difference in csoresid when l.houseyearm = 1 is the product .9839947 * 1.229935 * .9554095, the comparator here being non-adoption and csoresid = 0. The term L.houseyearm#c.csoresid by itself is the ratio of the IRR for adopters when csoresid = 1 to the IRR for non-adopters when csoresid = 1. Or, equivalently, it is the ratio of the IRR for adopters when csoresid = 1 to the IRR for adopters when csoresid = 0.

    I read that margins will not work with fixed effects.
    That's not true. It is true that following -xtpoisson, fe-, the -margins- command will only give you results conditional on the fixed effect being 0. In that respect, it is not different from what you get with your -lincom- approach: that, too, is conditional on fixed effect being 0. So if you are interested in numbers or probabilities of events, go to -margins-. If you are interested only in risk ratios, stick with -lincom-.

    As for your -lincom- commands, those in your first code block look good to me; the second block does not make much sense to me.

    Finally, I have a couple of comments that are not directed to your questions.

    1. I gather that the unit of analysis in your study is city, and the outcome is the number of cases of water-borne illness. But I don't see anything in the model that suggests you have adjusted for differences in population at risk among the cities. Without that it's hard for me to see how this analysis can be valid. Am I missing something here?

    2. It is poor, unsafe programming practice to use global macros unless there is no alternative. To simply hold a list of covariates, the safe approach is to use a local macro.
    Last edited by Clyde Schechter; 19 Oct 2017, 10:07.

    Comment


    • #3
      Dear Clyde,

      Thank you very much for the thorough answer. I really appreciate it.

      2. It is poor, unsafe programming practice to use global macros unless there is no alternative. To simply hold a list of covariates, the safe approach is to use a local macro.
      I was totally unaware that this was looked down upon. Thanks for pointing that out.

      1. I gather that the unit of analysis in your study is city, and the outcome is the number of cases of water-borne illness. But I don't see anything in the model that suggests you have adjusted for differences in population at risk among the cities. Without that it's hard for me to see how this analysis can be valid. Am I missing something here?
      Yes, my unit of analysis is city. However, I misspoke at the beginning of my post. My dependent variable is incidences of waterborne illness per 1,000 inhabitants (yearly). Does this clear up the problem?

      Comment


      • #4
        Yes, my unit of analysis is city. However, I misspoke at the beginning of my post. My dependent variable is incidences of waterborne illness per 1,000 inhabitants (yearly). Does this clear up the problem?
        Yes, that clears it up!

        Comment

        Working...
        X