Announcement

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

  • Significant interaction term in fixed effects model

    Dear all,
    I am currently running linear fixed effects regression models (xtreg, fe vce(cluster id)) to examine the consequences of moving in with a partner in later life for elderlies' well-being. All models are estimated separately for men and women, as I am interested in studying gender differences in the trajectories of elderlies' well-being after entering late-life cohabitation. To check whether the resulting trajectories are significantly different for men and women, I further ran a fully interacted model for the whole sample (men and women not separated) in which amongst tthe other interaction terms, the dummy 'female' is interacted with the time path (holding 6 periods of time) that captures the cohabitation effects (i.female#i.timepath).

    Unfortunately, I am struggeling with how to test (and interpret the corresponding tests) whether gender differences in the trajectories are significantly different. For me, the following 2 questions emerge, for which I would appreciate any kind of help!

    1. Testparm command
    I already tried to use the 'testparm' command and conducted 'testparm female#timepath' after running my fully interacted model. This test revealed that Prob > F = 0.0001. Accordingly, I guess that the interaction term is significantly different, indicating that men and women significantly differ in their well-being trajectories around the time of cohabitation. Is this how you can interpret the significant interaction term between female#timepath?


    2. Test command
    Furthermore, I am not only interested in how the well-being trajectories differ "on the whole" between men and women, but whether men and women significantly differ in distinct periods of time (for example in the years shortly after cohabitation or in their immediate reaction to entering late-life cohabtiation). Let's say the years shortly after cohabitation are captured in the periods "2 years after" and 4 "years after". Is it possible to test whether men and women significantly differ in this short fraction of time by using the following command?

    test 1.female#2yearsafter 1.female#4yearsafter 0b.female#2yearsafter 0b.female#4years after

    If not, can somebody please help me to get the right test command for testing significant gender differences in distinct periods of time?


    Thanks a lot for your time and help!
    Best regards,
    Babette

  • #2
    Babette:
    despite your detailed description, there's still something interested listers cannot get from you post, that is what you have typed and what Stata gave you back (as recommended by FAQ).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,
      thanks a lot for your patient tip.
      See the following stata commands I used


      Code:
      xtreg ac012 i.female#i.time_LS i.female#i.cage i.female#i.retired ///
      i.female#i.fstress i.female#i.longill i.female#c.hhsize ///
      if sample_ls == 1, fe vce(cluster mergeid_n)
      
      testparm female#time_LS
      From this command, I get the following result:


      Click image for larger version

Name:	result.PNG
Views:	1
Size:	7.9 KB
ID:	1521108


      My first question refers to whether I can conclude from this result, that men and women differ significantly in their well-being trajectories?


      Moreover, I ran the following code with the intention to check whether men and differ significantly in distinct fractions of time (e.g. 2 years before and at entry into cohabitation ( = periods 3 and 4)):


      Code:
      xtreg ac012 i.female#i.time_LS i.female#i.cage i.female#i.retired ///
      i.female#i.fstress i.female#i.longill i.female#c.hhsize ///
      if sample_ls == 1, fe vce(cluster mergeid_n)
      
      test 0b.female#3.time_LS 0b.female#4.time_LS ///
      1.female#3.time_LS 1.female#4.time_LS
      The corresponding result shows as follows:


      Click image for larger version

Name:	results2.PNG
Views:	1
Size:	4.0 KB
ID:	1521109


      I would like to know, whether I can conclude from this result that men and women significantly differed in the time fraction 2 years before and at entry into cohabitation (between period 3 to 4). Or do I have to run separate tests for men and women to answer this question?

      Code:
      test 0b.female#3.time_LS 0b.female#4.time_LS
      Click image for larger version

Name:	result3.PNG
Views:	1
Size:	2.7 KB
ID:	1521110


      Code:
      test 1.female#3.time_LS 1.female#4.time_LS
      Click image for larger version

Name:	result4.PNG
Views:	1
Size:	2.6 KB
ID:	1521111



      I hope I made clear, that I am struggeling with how to test for significant gender differences in the trajectories at a whole, and in distinct periods within this trajectory.

      Thanks a lot for your help!
      Kind regards,
      Babette

      Comment


      • #4
        Babette:
        a sort of overall advice that holds for all your codes is to avoid performing interaction that way.
        You interacted -female- with everything, but it's hard to believe that you gave a fair and true view of the data generating process.
        Moreover, how would you explain the results of all those interactions in a paper or during a podium presentatio?
        That said, you also excluded the main conditional effect of the -female- predictor.
        If you're actually interested in investigating the interaction between gender and time, the correct code is:
        Code:
        xtreg <depvar> i.female##i.time <other predictors> <controls>
        As an aside, running different regression for mean and women is redundant if you interact gender with time (or any other predictor you're interested in).
        Eventually, the -fe- estimato wipes out time-invariant predictors, such as gender. Again, taking a look at the outcome table of your -xtreg,fe- code would be extremely useful.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hi Babette. You mention that you estimate the model separately for males and females. I have never done a Chow test with panel data, but I don't see why you shouldn't be able to do it. The idea is the following. You estimate the model for the complete dataset without any interaction term. This is your restricted model, so get the SSR (residuals sum of squares) from it, and store it in a scalar say SSRr. Now, the unrestricted model is composed of the two separate estimations for each gender. The SSR of the unrestricted model is the sum of the SSRs of each gender estimation. So SSRur = SSRf + SSRm. Now you can do an F test using the typical formula for the F-statistic. F = ((SSRr - SSRur)/q) / (SSRur / (n - K)), where q is the number of restrictions (which should be K/2), n is the total number of observations (including both males and females), and K is the total number of parameters estimated in the unrestricted model (including the intercepts).

          Does someone know if this is viable with panel data with fixed effects? I really don't see why not, but I want to make sure.
          Alfonso Sanchez-Penalver

          Comment

          Working...
          X