apimgmt.blogg.se

Stata mp speed difference
Stata mp speed difference







  1. #STATA MP SPEED DIFFERENCE FOR MAC#
  2. #STATA MP SPEED DIFFERENCE FULL#
  3. #STATA MP SPEED DIFFERENCE CODE#

With multiple cores, one might expect to achieve the theoretical upper bound of doubling the speed by doubling the number of cores-2 cores run twice as fast as 1, 4 run twice as fast as 2, and so on. It is exactly like Stata/SE in all ways except that it distributes many of Stata’s most computationally demanding tasks across all the cores in your computer and thereby runs faster-much faster.

#STATA MP SPEED DIFFERENCE FULL#

Stata/MP is the version of Stata that is programmed to take full advantage of multicore and multiprocessor computers. That would explain why I haven't found a discussion of the differences between the two commands: there is no essential difference.īeyond that, while increased efficiency in xtlogit is certainly to be desired, knowing that both are aiming for the same target makes me more confident in substituting melogit for xtlogit, re if the xtlogit run times become onerous.StataMP provides implicilty parallel implementations of many functions, which are documented its 330 page Stata/MP Performance Report, describing which functions are parallelized and each's efficiency (how perfectly parallelized a given function is):

#STATA MP SPEED DIFFERENCE CODE#

I think what I am hearing is that differences in code reflect only differences in capabilities, not differences in the underlying statistical approach and that where the same model can be fit with either command any differences in the reported results only reflects the different numerical approaches. That seems to have a bad guess, and it led to the question I posed in my first post. At the level of the statistical theory are the simple commands I tested fitting the same model with the same assumptions and thus estimating the same quantities? It was the substantial difference in runtime, along with small differences in reported results, that led me to think that the code was different, and I the guessed that the difference was due to different underlying assumptions in xtlogit, re and melogit. I have one question to confirm my understanding. Many thanks for your efforts researching this issue. Specifically, the final log likelihood on the full model increased (became a smaller negative number) and was closer to that for melogit. ereturn list results show e(ml_method) of "d2" for xtlogit and "gf2" for melogit there are several other differences of this type again suggesting that something may be different under the hood, or I've not set up the melogit test correctly.īelow is the code I ran from the do-file editor for my test.Īdded in edit: adding intpoints(7) to xtlogit did not materially affect the speed but did make some of the results more comparable.xtlogit used 12 integration points fitting the full model melogit 7 this is consistent with what Enrique wrote.xtlogit includes a sequence of values of tau at the start of fitting the full model not so melogit this suggests there are some differences under the hood.

stata mp speed difference

In my actual dataset, the differences were negligible.

  • There are noticeable differences in the results of this test.
  • stata mp speed difference

    (For my actual dataset, I have not set timers, but the times for a group of three runs are minutes, not seconds, and the differences are easily noticeable.) I've run the two commands in both orders to make sure caching and the like wasn't affecting the comparison the speeds are similar in either order. xtlogit consistently runs about 16 seconds melogit about 4.Let me first ask, please review my melogit command: did I miss a necessary option on melogit necessary to make it comparable to xtlogit?

    #STATA MP SPEED DIFFERENCE FOR MAC#

    Below I run the first example from xtlogit using both xtlogit and melogit with timers, using Stata/SE 14.1 for Mac (64-bit Intel) Revision on a 2015 MacBook (no Pro, no Air). I'm hoping there's something already written that I didn't find in searching Statalist and using Google to search more widely.Įnrique's response mirrors my expectations. My interest is to learn a little more about these two approaches to the same problem, and to understand any differences in the underlying assumptions.

    stata mp speed difference

    I'm reassured that for this simple case, xtlogit and melogit yield essentially identical results. Since I'm analyzing panel data, xtlogit seems the natural choice for simple random effects - I'm not looking at a more complicated mixed model that only melogit can handle. The only noticeable differences is that xtlogit takes painfully longer to run.Ĭan someone point me to a discussion of the differences between the approaches embodied by the two procedures? I expect it is at a "philosophical" level, not just different pragmatic choices in the coding of the two procedures. || panel_id: yield essentially identical results. I am fitting a logistic model with random effects to panel data.









    Stata mp speed difference