mercredi 23 mars 2016

Replicating seed setting from Stata

I'm trying to replicate in R a bit of code someone else wrote in Stata, and have hit a wall trying to predict the behavior of their p-RNG.

Their code has this snippet:

set seed 123456

Unfortunately, it's a bit nebulous exactly the algorithm used by Stata. This question suggests it's a KISS algorithm, but didn't manage to replicate in the end (and some of the links there seem to be dead/outdated). And the manual from Stata for set seed doesn't mention anything about algorithms. This question as well doesn't seem to have been completed.

Is it a fool's errand to try and replicate Stata's random numbers?

I don't know which version of Stata was used to create this.




Aucun commentaire:

Enregistrer un commentaire