randWalk {EcoVirtual}R Documentation

Random Walk Simulations

Description

Simulates random walk models.

Usage

randWalk(S = 1, step = 1, tmax = 1e+05, x1max = 200, alleq = FALSE)

Arguments

S

number of individuals.

step

step size (number of steps on each time)

tmax

maximum simulation time.

x1max

maximum initial distance from absorption surface.

alleq

logical; if TRUE, all initial distance are equal. if FALSE, initial distances for each individual is a sample between 1 and maximum initial distance(x1max).

Details

Random walk is a stochastic process of a succession of random steps.

Zero is the absorption surface. When an individual simulation reaches zero, it means that the individual is dead.

See http://en.wikipedia.org/wiki/Random_walk.

Value

'randWalk' returns a graphic with the simulated trajectories of each individual.

'randWalk' also returns an invisible matrix with the distance from de edge for each individual on each time.

Author(s)

Alexandre Adalardo de Oliveira and Paulo Inacio Prado ecovirtualpackage@gmail.com

References

http://en.wikipedia.org/wiki/Random_walk

See Also

extGame, simHub, http://ecovirtual.ib.usp.br

Examples


## Not run: 
randWalk(S=100,step=2,tmax=2e5)
randWalk(S=10,step=1,tmax=1e4, x1max=300, alleq=TRUE)

## End(Not run)


[Package EcoVirtual version 1.1 Index]