Announcement

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

  • Contents of c(seed) in Stata 5.1

    I have recently upgraded from Stata 13.1 to Stata 15.1, and I am noticing a difference when I am doing Monte Carlo simulations. In Stata 13.1, I would set a seed, run N repetitions, save the results, and then store the contents of c(seed). Then when I wanted to run repetitions N+1 to 2N, I would simply use
    Code:
    set seed
    and the contents of c(seed) to start where I left off.

    When I try to do this in Stata 15.1, what I get out of c(seed) is very long and unwieldy, whereas it had been relatively short in Stata 13.1. Why is this? Is there another way of doing what I had been doing in version 13.1?

  • #2
    You may use - version - to keep as and old version.
    Best regards,

    Marcos

    Comment


    • #3
      They changed (improved) the random number generator, and this is a consequence.

      Long numbers/strings have never been a problem for me because I don't type them in; I just store them in a local macro and refer to that. Another solution that might work for you is help set rngstream
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment


      • #4
        See

        Code:
        help whatsnew13to14
        and search for "New random-number generators".

        By extension

        Code:
        help whatsnew 
        help whatsnew14to15 
        help whatsnew13to14
        survey what's been added since your previous version.

        Comment


        • #5
          Sometimes, for example, when the analysis is under paper review, we may need to provide the same results during the "interaction" with the reviewers. In order to avoid getting caught in the middle of the transition between Stata versions, you may get the values in the new version, but according to the old random-number generator. Otherwise, as expected and explained above, the new method is even better, hence no grounds to preserve the old one, apart from the example given.
          Best regards,

          Marcos

          Comment

          Working...
          X