Library: | times |
See also: | simRPRP |
Quantlet: | simRP | |
Description: | generates renewal process. |
Usage: | y = simRP(distrib,params,T,N,res) | |
Input: | ||
distrib | string, waiting time distribution | |
params | n x 1 vector, parameters of the waiting time distribution, n=1 (exponential), n=2 (gamma, lognormal, Pareto, Weibull), n=3 (Burr, mixofexps) | |
T | scalar, time horizon | |
N | scalar, number of trajectories | |
res | scalar, number of intervals generated in one loop | |
Output: | ||
y | 2*max+2 x N x 2 array, maximum number of jumps for all generated trajectories |
library("xplore") library("times") library("plot") randomize(101) y1=simRP("exponential",1,5,1) y1=reduce(y1) d1 = createdisplay(1,1) adddata(d1, 1, 1,setmask(y1,"line","medium","red", "style",1)) y2=simRP("Burr",#(3,2,1),5,1) y2=reduce(y2) adddata(d1, 1, 1,setmask(y2,"line","medium","blue", "style",1))
Show two trajectories of the renewal process.