Displaying 1 result from an estimated 1 matches for "countneg".
Did you mean:
countreg
2011 Jul 27
3
Is R the right choice for simulating first passage times of random walks?
Dear R folks,
I need to simulate first passage times for iterated partial sums. The
related papers are for example [1][2].
As a start I want to simulate how long a simple random walk stays
negative, which should result that it behaves like n^(-?). My code looks
like this.
-------- 8< -------- code -------- >8 --------
n = 100000 # number of simulations
length = 100000 # length of