# Simulation of Gamma process b <- 10 h <- 0.01 T <- 1 t0 = 0 t <- c(0) x0 <- 0 X <- c(0) while(t[length(t)] <= T){ u <- runif(1) x0 <- x0 - log(u)/b X <- c(X,x0) t0 <- t0 + h t <- c(t, t0) } plot(t, X, type='l')