Announcement

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

  • Problem with time trend in a fixed effect model

    Dear Statalisters,

    I am running a fixed effects model to observe effect of IT on employment over time and countries. I have employment as my independent variable and IT, GDPPC, GDPPC^2 and urbanization, as explanatory variables.

    I have 11 years and 35 countries, I want to control for global trend (e.g recessions) and country specific trends since employment rates in will have different trends in different countries.

    I have included year and country dummies and ran xtreg fe, with xtset country Year, but I am not sure how to do the country specific trends.

    Thanks very much for you help!!

  • #2
    Carls:
    welcome to the list.
    As you're advised by FAQ, your chances of getting helpful replies is conditional on posting what you typed and what Stata gave you back.
    You probably meant that -employment- is your dependent variable.
    That said, you may want to try something along the following lines:
    Code:
     xtset country year
    xtreg employment i.IT c.GDPPC##c.GDPPC i.urbanization, fe///the toy-example assumes that IT and urbanization are categorical variables, whereas GDPPC is a continuous one
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      The following non-exclusive alternatives are available:
      Code:
      regress depvar indepvars i.country##c.Year
      xtreg depvar indepvars i.country#c.Year, fe
      Alternatively, the user-written command reghdfe by Sergio Correira might be of interest:
      Code:
      ssc install reghdfe
      reghdfe depvar indepvars, absorb(i.country##c.Year)
      If you also want to include year dummies, just add i.Year to all the specifications.
      https://www.kripfganz.de/stata/

      Comment


      • #4
        Thank you for your response.

        Yes I apologies, I meant I had employment as my Dependent variable.

        I ran the commands but I received an error saying that the variables IT and urbanization may not contain non-integer values.

        Let me explain a bit more so it might be easier to understand

        I am running the fixed effect model to see the effect of IT on the employment ratio between high and low skilled. My actual dependent variable is Empratio, which is Highskilled employment/lowskilled employment.

        What I want to do is to include some country specific trends, since i.e. employment rates in Mexico will not only be on average different than in the UK but also have different trends.

        Thanks again!

        Comment


        • #5
          Carls:
          the error that Stata returned is explained considering that, conversely to my assumptions, -IT- and -urbanization- are nor categorical, but continuous: again, it's up to you detailing this and (all the necessary) kind of stuff when asking for a positive reply: FAQ are once more mandatorily worth reading in this respect.
          That said, I would follow one of the Sebastian's helpful proposal:
          xtreg depvar indepvars i.country#c.Year, fe
          I'm less attracted by -regress- when it comes to panel data analysis, unless the F-effect for individual effects shows no evidence of statistical significance (that test creeps up as a footnote of the outcome table after -xtreg,fe-, provided that the standard errors [SEs] are not robustified or clustered), anyway, if -regress- were your choice, i would -cluster- the SEs o the -panel_id-, as you're dealing with non-independent observations.

          I would also check whether employment rate can be considered continuous or not.
          Last edited by Carlo Lazzaro; 08 Feb 2017, 10:50.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Thanks for you help. I ran the commands (please see the screenshot attached).

            I am a bit confused on how to interpret the p values for each country, are these representing the IT effect on the employment ratio on each country?
            The coefficient for IT also seems a little weird since I was expecting it to be positive.

            Thanks again!
            Click image for larger version

Name:	Screen Shot 2017-02-08 at 15.42.47.png
Views:	1
Size:	236.3 KB
ID:	1373476

            Comment


            • #7
              I agree with Carlo that xtreg is to be preferred to regress.

              The coefficient of IT is statistically insignificant. In that case, its sign does not matter.

              The coefficient of country-specific trends (and intercepts) and their p-values do not have a meaningful interpretation. They are not consistently estimated (keyword: incidental parameters problem). They are just used to control for their joint effect to obtain consistent estimates of the other coefficients.
              https://www.kripfganz.de/stata/

              Comment


              • #8
                Carls:
                I would also considering a more parsimoniuos model, as you seem to have far too many predictors (38) with (only) 390 observations.
                As an aside, it is not clear to me why you stuck with creating squared terms by hand instead of relying on the wonderful capabilities of -fvvarlist-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X