Announcement

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

  • r(2000) problem with monte carlo postfile command

    Dear All,

    I need to perform a monte carlo study and I set the number of iteration to 1000.

    I had a weird problem... when I set the number of iteration to 2, the do file had no problem at all, but when I set the number to 1000, after 30 minutes, Stata stopped running and told me

    quietly {
    r(2000);

    end of do-file

    r(2000);

    This indicates no data inside the file.

    I tried to set the iteration to 10, it still worked perfectly, and I've tried to use different seed, but the problem is still there.


    Had anyone met this problem before?

    Best,
    Lui
    Last edited by Lui Yiu Lim; 21 Dec 2014, 19:30.

  • #2
    Please read the FAQs re: posting actual code and results/errors.

    I'd be reasonably certain that your simulation is set up such that it can iterate a few times (ten at least) and not run out of memory. But odds are (no way to tell without code) that your simulation involves a lot of parameters to be stored in memory, and it fails. Possibly somebody else can suss out the root cause (I would expect out of memory error, not no obs), but depending on the model, it might be running out of memory.

    Try turning off -quietly- to get the full message.

    Just as an odd thought, try adding -noisily memory- to your loop, and running it with 20, 40, 80, 160, 320 etc. reps to see where it gives up.

    Comment


    • #3
      You're doing something wrong. To find out more about what it might be, see Section 12 of the Statalist FAQ.

      Comment

      Working...
      X