Announcement

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

  • Panel Data Non-linear regression

    Hello,
    I am currently working with panel data at the municipality level and I analyze how/whether the number of immigrants in a municipality influences the vote share of left parties.

    I use the following first-difference regression, where control refers to a set of control variables and a(i.dep_year) captures the time-department fixed effects.
    Code:
    reghdfe d.left_VoixExp d.num_immigrants $d.control , a(i.dep_year) cluster(Departementcode)
    After plotting the data, I realized that the estimated effect might not be linear, but rather stronger at the beginning and flattening out after some number of immigrants has moved to the municipality.
    Now my question is how I can adjust my regression to analyze whether the effect is really declining in the number of immigrants?

    Attached you can see a simple plot of the data.

    Thank you very much in advance!

    Attached Files

  • #2
    Lea:
    I'm not clear with your regression code.
    That said, you may want to add a squared terms for the number of immigrants in the right-hand side of your regression equation (in addition to the linear predictor) and check whether a quadratic relation with the regressand does exist.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      thank you very much for your help. I have a follow up question on the interpretation of my results. Does the positive sign on the squared term imply that the strength of the negative effect of immigrants on left party vote decreases in the number of immigrants, i.e. strong effect when going from none to some immigrants, and less negative effect subsequently?

      Code:
      d.                
      extreme_left_Vote | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
      ---------------------+----------------------------------------------------------------
      d.#immigrants      |  -1.088239   .2694116    -4.04   0.000    -1.616282   -.5601962
      d.#immigrants^2  |   .0625832   .0308061     2.03   0.042     .0022037    .1229627
      Thank you very much for your help!

      Comment


      • #4
        Lea:
        it means that you have a turning point at 8.6943381 (an absolute minimum?):
        Code:
        . di (1.088239)/(2*.0625832)
        8.6943381
        Hence, the relationship between the regressand and -d.#immigrants- changes its signs (as per its 1st derivative) after that point.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X