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 reply to Re^2: Simulating uni-dimensional Hawkes processes by glrm_master
in thread Simulating uni-dimensional Hawkes processes by glrm_master

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.