Description Usage Arguments Value Examples
This thinning-based algorithm returns arrivals from the cubic spline function arrival rate
1 |
knots |
The knots upon which the B-spline is built - output 2 of the spl_Fit function (spl_Fit$Knots) |
c |
The spline-coefficients of the spline function - output 1 of the spl_Fit function (spl_Fit$Opt_Spl_Coeffs) |
m |
The number of days of arrivals required |
Arrivals - An unsorted vector containing the arrivals from day 1 to m one day after another
1 2 3 4 5 6 7 8 9 10 11 | ## spline-based intensity defined on [0,10]
d<-3 #spline function degree
knots<-seq(-3,13,by=1)
n<-length(knots)-(d+1)
c<-runif(n,1,5)
m<-5
## plot the spline-based function and the arrivals
x<-seq(0,10-0.01,by=0.01)
plot(x,spl(x,knots,c),lwd=0.5,ylim=c(0,5),type="l")
Arrs<-spl_Arrs(knots,c,m)
points(sort(Arrs),rep(0,length(Arrs)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.