Announcement

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

  • Controlling for autocorrelation in regression when only some of the variables are autocorrelated

    Dear all,
    I am working with the following dataset, stacked by id and domain
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str26 countryname float id long domain float(dataset pol_sophistication) byte perform_gov float(my_issue voted_party_pervote voted_party_extremism voted_party_blur100 voted_party_repgap voted_party_age_party polarization n_parties)
    "Austria" 31032 2 2019      8.75 1 0    3.8 1.0375171 1.4077452  4.037517 32 4.217497 4.085089
    "Austria" 30699 2 2019         5 2 0    3.8 1.0375171 1.4077452  3.037517 32 4.217497 4.085089
    "Austria"   822 2 2014  8.823529 2 0 23.991  .9172006 18.314589 2.0827994 65  5.33847 5.189692
    "Austria" 30636 2 2019     9.375 1 0 25.966  3.363714  56.53221 1.6362858 69 4.217497 4.085089
    "Austria" 30266 2 2019      3.75 1 .  31.47  3.320255  55.51868  3.320255 69 4.217497 4.085089
    "Austria" 30454 2 2019     9.375 1 0  31.47  3.320255  55.51868 2.3202553 69 4.217497 4.085089
    "Austria" 30708 2 2019         5 2 0 26.859 1.2898846 1.5980145 3.2898846 69 4.217497 4.085089
    "Austria"   275 2 2014  8.235294 1 . 23.991  .9172006 18.314589 3.9172006 65  5.33847 5.189692
    "Austria" 30324 2 2019      8.75 . 0  5.296 1.5868378 13.084457  2.586838  5 4.217497 4.085089
    "Austria"   677 2 2014  9.411765 1 . 23.991  .9172006 18.314589 1.0827994 65  5.33847 5.189692
    "Austria" 30567 2 2019     4.375 2 0 25.966  3.363714  56.53221  3.363714 69 4.217497 4.085089
    "Austria" 30753 2 2019     3.125 1 0  31.47  3.320255  55.51868  3.320255 69 4.217497 4.085089
    "Austria" 30310 2 2019      6.25 1 0 25.966  3.363714  56.53221  6.363714 69 4.217497 4.085089
    "Austria" 31050 2 2019     1.875 1 0 25.966  3.363714  56.53221  4.363714 69 4.217497 4.085089
    "Austria"   336 2 2014  5.294117 1 . 26.819  3.550965         0  2.550965 65  5.33847 5.189692
    "Austria"   301 2 2014  5.294117 2 1 20.506   2.83029  46.62173   2.83029 65  5.33847 5.189692
    "Austria"   538 2 2014        10 2 0 23.991  .9172006 18.314589  .9172006 65  5.33847 5.189692
    "Austria" 30695 2 2019      6.25 2 1  31.47  3.320255  55.51868  3.320255 69 4.217497 4.085089
    "Austria" 30174 2 2019     8.125 2 0  31.47  3.320255  55.51868  6.320255 69 4.217497 4.085089
    "Austria" 30775 2 2019     8.125 1 0 26.859 1.2898846 1.5980145 .28988457 69 4.217497 4.085089
    "Austria"   576 2 2014  7.647059 1 1 12.416 1.5764472  3.320789 1.5764472 28  5.33847 5.189692
    "Austria" 30938 2 2019        10 2 0 26.859 1.2898846 1.5980145 1.7101154 69 4.217497 4.085089
    "Austria" 30259 2 2019     4.375 2 0 26.859 1.2898846 1.5980145 3.7101154 69 4.217497 4.085089
    "Austria" 30895 2 2019      1.25 2 0  5.296 1.5868378 13.084457  4.586838  5 4.217497 4.085089
    "Austria" 30456 2 2019     1.875 . 0  31.47  3.320255  55.51868  3.320255 69 4.217497 4.085089
    "Austria" 30441 2 2019      8.75 1 0 26.859 1.2898846 1.5980145 3.7101154 69 4.217497 4.085089
    "Austria" 30808 2 2019     3.125 2 0 25.966  3.363714  56.53221 1.3637142 69 4.217497 4.085089
    "Austria" 30382 2 2019      3.75 2 0  31.47  3.320255  55.51868 4.3202553 69 4.217497 4.085089
    "Austria"   687 2 2014  8.823529 2 1  4.964  2.581272  42.51263 .41872835  1  5.33847 5.189692
    "Austria" 30411 2 2019         5 1 0 25.966  3.363714  56.53221 1.6362858 69 4.217497 4.085089
    "Austria" 30936 2 2019      6.25 2 0 26.859 1.2898846 1.5980145 3.7101154 69 4.217497 4.085089
    "Austria" 30995 2 2019     4.375 2 0 26.859 1.2898846 1.5980145 2.7101154 69 4.217497 4.085089
    "Austria"    77 2 2014  8.235294 1 . 23.991  .9172006 18.314589 2.0827994 65  5.33847 5.189692
    "Austria" 30318 2 2019         5 2 1 25.966  3.363714  56.53221  7.363714 69 4.217497 4.085089
    "Austria"    17 2 2014 4.7058825 1 . 26.819  3.550965         0  .4490347 65  5.33847 5.189692
    "Austria" 30225 2 2019         5 2 0 26.859 1.2898846 1.5980145 1.7101154 69 4.217497 4.085089
    "Austria"  1001 2 2014  5.294117 1 . 20.506   2.83029  46.62173   2.83029 65  5.33847 5.189692
    "Austria" 30303 2 2019       2.5 1 0  31.47  3.320255  55.51868  3.320255 69 4.217497 4.085089
    "Austria"   574 2 2014  3.529412 . 0 20.506   2.83029  46.62173   2.83029 65  5.33847 5.189692
    "Austria" 30704 2 2019      .625 1 1 26.859 1.2898846 1.5980145  6.289885 69 4.217497 4.085089
    "Austria"   197 2 2014  8.823529 2 1 23.991  .9172006 18.314589 1.0827994 65  5.33847 5.189692
    "Austria" 30459 2 2019     8.125 1 0 25.966  3.363714  56.53221 1.3637142 69 4.217497 4.085089
    "Austria"   163 2 2014  8.823529 1 . 26.819  3.550965         0 1.4490347 65  5.33847 5.189692
    "Austria"   553 2 2014  3.529412 2 1 20.506   2.83029  46.62173   7.83029 65  5.33847 5.189692
    "Austria"   588 2 2014        10 2 0 26.819  3.550965         0 1.5509653 65  5.33847 5.189692
    "Austria" 30928 2 2019     8.125 1 0 25.966  3.363714  56.53221 2.3637142 69 4.217497 4.085089
    "Austria"   236 2 2014  8.235294 1 1 26.819  3.550965         0  2.550965 65  5.33847 5.189692
    "Austria" 30822 2 2019       7.5 1 0 26.859 1.2898846 1.5980145 .28988457 69 4.217497 4.085089
    "Austria" 30467 2 2019      6.25 2 0 26.859 1.2898846 1.5980145 .28988457 69 4.217497 4.085089
    "Austria"   944 2 2014  7.058824 2 . 20.506   2.83029  46.62173   5.83029 65  5.33847 5.189692
    "Austria"   722 2 2014  8.235294 2 0 20.506   2.83029  46.62173   5.83029 65  5.33847 5.189692
    "Austria"   804 2 2014  8.823529 2 1 23.991  .9172006 18.314589  5.917201 65  5.33847 5.189692
    "Austria" 30687 2 2019     8.125 1 0 25.966  3.363714  56.53221 1.3637142 69 4.217497 4.085089
    "Austria" 30291 2 2019     9.375 1 0 25.966  3.363714  56.53221  4.363714 69 4.217497 4.085089
    "Austria" 30274 2 2019      1.25 2 0 25.966  3.363714  56.53221  7.363714 69 4.217497 4.085089
    "Austria"   319 2 2014 4.7058825 2 . 12.416 1.5764472  3.320789 .42355275 28  5.33847 5.189692
    "Austria" 30835 2 2019     9.375 1 0 25.966  3.363714  56.53221  3.363714 69 4.217497 4.085089
    "Austria" 30780 2 2019     5.625 1 0 25.966  3.363714  56.53221  .3637142 69 4.217497 4.085089
    "Austria"   485 2 2014  6.470588 2 0 12.416 1.5764472  3.320789 .42355275 28  5.33847 5.189692
    "Austria"   253 2 2014  7.058824 2 0 23.991  .9172006 18.314589  .9172006 65  5.33847 5.189692
    "Austria"   686 2 2014 2.3529413 2 1 12.416 1.5764472  3.320789 .42355275 28  5.33847 5.189692
    "Austria" 30434 2 2019       2.5 2 0 25.966  3.363714  56.53221  3.363714 69 4.217497 4.085089
    "Austria" 30437 2 2019     9.375 1 0  31.47  3.320255  55.51868  .3202553 69 4.217497 4.085089
    "Austria"   568 2 2014  5.294117 2 . 26.819  3.550965         0  .5509653 65  5.33847 5.189692
    "Austria" 30660 2 2019       7.5 . 0  31.47  3.320255  55.51868  8.320255 69 4.217497 4.085089
    "Austria" 30934 2 2019     3.125 1 1 26.859 1.2898846 1.5980145 4.2898846 69 4.217497 4.085089
    "Austria" 30351 2 2019      3.75 . 0 25.966  3.363714  56.53221  .3637142 69 4.217497 4.085089
    "Austria" 30081 2 2019       7.5 2 0    3.8 1.0375171 1.4077452  3.962483 32 4.217497 4.085089
    "Austria"   187 2 2014  9.411765 1 1 23.991  .9172006 18.314589  .9172006 65  5.33847 5.189692
    "Austria" 30908 2 2019     9.375 1 1 26.859 1.2898846 1.5980145  .7101154 69 4.217497 4.085089
    "Austria" 30962 2 2019         5 2 0  31.47  3.320255  55.51868 2.3202553 69 4.217497 4.085089
    "Austria"   589 2 2014  8.823529 2 0 23.991  .9172006 18.314589  5.917201 65  5.33847 5.189692
    "Austria" 30496 2 2019      8.75 . 0 25.966  3.363714  56.53221  8.363714 69 4.217497 4.085089
    "Austria"    68 2 2014  9.411765 1 0 26.819  3.550965         0  2.550965 65  5.33847 5.189692
    "Austria"   902 2 2014  7.647059 1 0 23.991  .9172006 18.314589 3.9172006 65  5.33847 5.189692
    "Austria" 30563 2 2019      3.75 1 0 25.966  3.363714  56.53221 1.3637142 69 4.217497 4.085089
    "Austria"   900 2 2014 4.7058825 2 1 20.506   2.83029  46.62173   5.83029 65  5.33847 5.189692
    "Austria" 30101 2 2019      3.75 1 0  31.47  3.320255  55.51868 4.3202553 69 4.217497 4.085089
    "Austria" 30536 2 2019     5.625 2 0  31.47  3.320255  55.51868 2.3202553 69 4.217497 4.085089
    "Austria" 30833 2 2019     4.375 1 0 26.859 1.2898846 1.5980145 1.7101154 69 4.217497 4.085089
    "Austria" 30940 2 2019     5.625 1 0  31.47  3.320255  55.51868  6.320255 69 4.217497 4.085089
    "Austria" 30698 2 2019     4.375 . 0 25.966  3.363714  56.53221 1.3637142 69 4.217497 4.085089
    "Austria"   169 2 2014  7.058824 1 . 26.819  3.550965         0  2.550965 65  5.33847 5.189692
    "Austria"  1012 2 2014  8.235294 1 . 26.819  3.550965         0 1.4490347 65  5.33847 5.189692
    "Austria" 30308 2 2019         5 1 1  31.47  3.320255  55.51868  .6797447 69 4.217497 4.085089
    "Austria" 30914 2 2019     8.125 1 0 26.859 1.2898846 1.5980145 3.7101154 69 4.217497 4.085089
    "Austria" 30573 2 2019       2.5 1 0 25.966  3.363714  56.53221  4.363714 69 4.217497 4.085089
    "Austria"   501 2 2014  5.882353 1 1 12.416 1.5764472  3.320789  2.423553 28  5.33847 5.189692
    "Austria"   581 2 2014  7.058824 2 . 23.991  .9172006 18.314589 1.0827994 65  5.33847 5.189692
    "Austria" 30430 2 2019     3.125 . 0 25.966  3.363714  56.53221  8.363714 69 4.217497 4.085089
    "Austria" 30285 2 2019     5.625 2 0 26.859 1.2898846 1.5980145 4.2898846 69 4.217497 4.085089
    "Austria"   928 2 2014 2.9411764 1 1 23.991  .9172006 18.314589 4.0827994 65  5.33847 5.189692
    "Austria"   203 2 2014  5.882353 . 0 26.819  3.550965         0  7.550965 65  5.33847 5.189692
    "Austria"   848 2 2014  8.823529 1 . 23.991  .9172006 18.314589  4.917201 65  5.33847 5.189692
    "Austria" 30112 2 2019     8.125 1 0  31.47  3.320255  55.51868  .3202553 69 4.217497 4.085089
    "Austria"   648 2 2014  7.058824 2 . 26.819  3.550965         0  5.550965 65  5.33847 5.189692
    "Austria"   156 2 2014  9.411765 2 . 12.416 1.5764472  3.320789 1.4235528 28  5.33847 5.189692
    "Austria" 30972 2 2019     9.375 . 0  31.47  3.320255  55.51868  3.320255 69 4.217497 4.085089
    "Austria"   803 2 2014  5.294117 2 1 23.991  .9172006 18.314589 2.0827994 65  5.33847 5.189692
    "Austria" 31009 2 2019       2.5 1 0 25.966  3.363714  56.53221  7.363714 69 4.217497 4.085089
    end
    label values domain domain3
    label def domain3 2 "Redistribution", modify
    label values perform_gov QPP20_1
    label def QPP20_1 1 "Approve", modify
    label def QPP20_1 2 "Disapprove", modify
    I am estimating several mixed-effects regression models with random intercepts at the country level, for each domain.

    Code:
     mixed voted_party_repgap voted_party_blur100 pol_sophistication feelclosest_is_closest perform_gov voted_party_pervote  voted_party_extremism voted_party_age_party  polarization n_parties dataset if domain==2  || country:
    My dependent variable is voted_party_repgap, which measures the distance between each individual voter and her voted party on several domains. That is, this variable is created by matching data derived from two different sources (party-level and individual-level). Additionally, some of the IVs are party-level, some are party-system level, and some are individual-level.

    My main IV is voted_party_blur100. Since it could be argued the case for reverse causality, I would like to address this possibility. One way (I guess) to do so is to lag my main IV (at time t) and regress my DV at time t+1 on it. The methodological issues I see are several, however. Most importantly, my DV is generated my matching party-level data that are panel data, with individual level-data that are taken from repeated cross-sections. That is, I have different individuals for each wave of the election study. Additionally, if I follow this path, shall I lag also the other variables in the model? Again, if so, I would encounter similar issues as above with individual-level predictors such as pol_sophistication, feelclosest_is_closest, and perform_gov, which come from different individuals.
    What is the best way to deal with reverse causality in such a case? What is the most parsimonious solution? Are there alternatives?

    Sorry in advance if the question will come out as confusing.

    Sincerely
    Mattia

  • #2
    autocorrelation relates to the residual

    Comment

    Working...
    X