Announcement

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

  • Issues with Parallel Computing and xtreg

    Hi, I am trying to run panel regressions using the package parallel that allows for parallel computing in Stata. I am running my regressions using the xtreg command on a server running Stata MP 15.1. I am setting my clusters to 4 using:
    Code:
    parallel setclusters 4
    However, I am getting some weird results. For instance, on a test for the following regression:
    Code:
    xtreg growth ind_VEI_30 ind_VEI_200, fe cluster(id_country)
    I get the following output:



    However, when I run it in parallel, either using:
    Code:
    parallel: xtreg growth ind_VEI_30 ind_VEI_200, fe cluster(id_country)
    or creating a do file with my regression and then running:
    Code:
    parallel do mydofile.do
    I get the following result, which is different:



    The difference comes from the fact that when I run in parallel I lose a bunch of observations for some unknown reason to me (from 2,631,520 to 495,402). Am I doing something wrong, that's why I am running into this issue or this is indeed very weird? Every single time I tried I ran into this problem, even though my clusters exited without errors.

    It is very important to me understand what is going on, because although I can run these xtreg regressions without using parallel, it is unviable for me to do so when using the ols_spatial_HAC package. So thanks in advance for your help!
Working...
X