Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Simulating uni-dimensional Hawkes processesby glrm_master (Initiate) |
on Feb 18, 2013 at 19:29 UTC ( [id://1019389]=note: print w/replies, xml ) | Need Help?? |
thanks a lot roboticus for your help: I will look into your changes as soon as I'm done preparing tomorrows exam :(( now, back to your coments: 1)I usually let the loop run for 10,000 or 50,000 iterations to get my arrival times (that I then use in my MLE to get the estimates for lambda0, alpha and beta)... I must have send you a latest version of the code where i was trying to figure out in only 2 iterations what the hack was wrong with my code... but you made a very good point about it! 2)thanks for the advice about how/where to define my variables (including the whole "action at distance issue"): i'll definitely keep that in mind in my codes! 3)I was wondering what was the best way to code an algorith that has an initiation step: thanks for the idea! in my first version of this code I did as you suggested (keeping the initiation out of the loop and than starting the loop from an according index...).. not sure why i decided to go with this way afterwords :( 4)hahaha.. sorry for the mess in the coding!! I'm not sure I understand why you use the same sequence of random variables: once my algo is initiated, i generate one uniform0,1 in order to get one random variable with an exponential distribution (using the inverse function method) and one uniform0,1 to run an Acceptance/Rejection of sorts (in this case , for stockastic processes is called a "thinning procedure") to decided whether to keep or drop the exponential random variable. However, I haven't had the time yet to run/chane my code with your changes (exam tomorrow keeps me busy) but I will do so ASAP and let you know!! I really appreciate your help and I will get back to you as soon as i'm done! take care kris
In Section
Seekers of Perl Wisdom
|
|