Regarding your question: Why do I use the same sequence of random variables?
Well, when I first ran your program a couple of times, I got different results each time. Exactly as you'd expect from a program using some random numbers.
However, I was playing with the program, I couldn't be certain I haven't broken the code. After all, I wouldn't know what values should come out. So it would be easy for me to introduce an error without noticing it. So I told the program to use the same random numbers each time. That way, I could make a change and run the program. If the output was the same, I probably didn't break it. Then I could move on to the next change. If the output was different, though, I could immediately identify (1) that I introduced an error, and (2) the error was between the last two runs. So I just keep the code in one window, and run the program in another window. That way, I could run the program after each significant change.
It may be helpful to you for debugging to use the same sequence of random numbers: You could play along by hand with a calculator and verify that the numbers are working the way you want them to. If you find an error, you can correct it, and then run it again and verify that the correction did what you wanted, without having to kill your fingers and your calculator by starting over with a new set of numbers....
Of course, once you get the code working, you switch back to normal random numbers.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: Simulating uni-dimensional Hawkes processes
by roboticus
in thread Simulating uni-dimensional Hawkes processes
by glrm_master
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |