Announcement

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

  • Country-specific time trends

    Hello,

    I am working on a panel dataset (24 countries, over 30 years) and I am trying to estimate a two-ways fixed effects model and include as controls country-specific time trends. I was trying to find out what would be the best way to do that?

    When I was searching trhough past posts, I saw someone suggesting using:

    gen t=_N +1979

    and then include t in the regression.

    But I wasn't sure if that was appropriate? Is there a better way to do that given my data?

    Thank you for your help in advance,

    Aleksandra

  • #2
    Well, the generic way to adjust for country-specific time trends would be to include i.country##c.year in your model.

    But are you sure you want to do this? For shorter periods of time, this could make sense, but there are very few outcome variables that one would expect to show a linear trend over a period as long as 30 years.

    As for -gen t = _N + 1979-, this doesn't seem right. Perhaps you mean -by country: gen t = _n + 1979-? That would, in effect, assign years 1980, 1981, 1982,... to consecutive observations within country panels. But you already presumably have a year variable, so why would you need to create a new one? In any case, just including a time variable in the model without also including its interaction with country would not adjust for country-specific time trends, it would only adjust for an overall time-trend applicable to all countries.
    Last edited by Clyde Schechter; 02 Mar 2017, 10:06. Reason: Correct typo.

    Comment


    • #3
      Dear Clyde,

      Thank you for your response. So I was thinking of using i.country##c.year as you mentioned, but I do not have enough degrees of freedom to do that with my data.

      The relationship I am trying to estimate is the impact of family policies (such as cash transfer, lenght of parental leave etc) on fertility rates. My model to be estimated is:



      I was thinking that including a time trend makes sense because there was generally a trend for the fertility to consistently go down in all countries I am lookin at. But I also wanted to allow for the fact that these trends could be different for different countries. Hence the country-specific time trend .

      Do you have any idea how I could go about that?

      Thank you,

      Aleksandra

      Comment


      • #4
        Sorry I think that my model did not load for some reason. But basically is is fertility being dependent on country-specific fixed effects, period-specific fixed effects, policy + controls, and the country-specific time trend: cit

        Comment


        • #5
          Note: Whatever images you attached to show your model is not readable, at least on my setup. Attaching images is generally discouraged here, as these technical problems arise often. If you want to show Stata results, open up a code block (see FAQ #12 for instructions how to do that) and then past the Stata output directly from the Results window or your log file into that code block. If you are trying to show a scan of a text or a screen capture that is not text, or something like that, then it is my understanding that .png graphics work best here.

          As for your question about the time trends, if you don't have enough degrees of freedom to include i.country##c.year interactions, then you simply can't do this with your existing data. One solution would be to get a larger data set (more observations per country per year) if that is possible. Another possibility is to switch to a random slopes model:

          Code:
          mixed fertility_rate policy_variables year covariates || country: year
          This approach will effectively adjust for country-specific time trends. It has the strengths and limitations of a mixed-effects model. If you are doing this from an economics perspective, that may be a hard sell. If you are doing this from an epidemiologic perspective, it is unlikely anybody will object.

          Another approach, staying with fixed-effects modeling, would be to identify groups of countries that might reasonably be presumed to have experienced similar rates of time trends in fertility. Create a variable, group, that identifies these groupings, and then include i.group##c.year in your model. If your groups are sufficiently large (and few in number) this will save you many degrees of freedom and you may be OK. Note that group will be constant within country, so the group indicators will be omitted from the model due to colinearity--but that isn't a problem and you shouldn't worry about it.

          Added: Crossed with #5, which observe the difficulties pointed out in the first paragraph here.

          Comment


          • #6
            Maybe the following earlier discussion here on Statalist helps:
            Problem with time trend in a fixed effect model
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Hello,
              I have a very similar question. I am running regressions on fertility rates on yearly data for T = 15 and 34 countries. During this period, fertility has been rather stable for few countries, for the others it has increased and for a last group it has decreased. But trends are not really linear since in many countries they have changed after the onset of the great recession.
              I have run two-ways fixed regressions using xtpcse, hetonly to account potential autocorrelation of residuals, but I am wondering whether I should also include country specific time trends in my model, in order to de-trend the data and to capture the potential effect of unboserved characteristics (for instance, the posponement of childbearing that can drive fertility trends rather specifically in each country).
              my dependent variable is fertility rates, and my independent variables are female employment rates, unemployment rates, the share of temporary contracts, the proportion of workers working more than 50 hours, the share of people with very short job tenure (450 observations); and in another model I add infortmation on the share of self-employment and the incidence of low pay (and my number of observations falls to 215).

              I have tested two ways to include time trends.
              - country specific time trends for the 34 countries, but I think I have too few degrees of freedom to do so and by including such trends I introduce more problems than it helps to solve them. These trends seems to be highly correlated with some of my explanatory variables, and I face multicollinearity problems.

              - group specific time trends, as suggested by Clyde above; I have made 3 groups of countries (one where trends are pretty stable, one where fertility is increasing, the other where it is decreasing), but again, when I look at the data, the trends do not look very linear.

              My concern is that the three models give very different results for few variables. For instance, the incidence of self-employment is positive and highly significant in the model without linear time trends, positive but not statiscally significant in the model with "group" time trends, and strongly negative with the country specific time trends.

              I am tempted to stick with the results of the model that do not include time trends, but at the same time, I know that I miss unobserved factors if I don't control for any time trends. What would you recommend, please?
              Many thanks in advance,
              Olivier

              Comment

              Working...
              X