Description Usage Arguments Value Examples
This function fits a spline function from cardinal B-splines and returns the optimal spline coefficients and the knot points it was built upon
1 2 |
Arrivals |
A vector of arrival times. If multiple days the days are appended and not sorted. |
m |
A scalar number of days of arrival data |
n_arrs |
A vector containint the number of arrivals on each observed day |
Tstart |
The start of the period of observation |
Tend |
The end of the period of observation |
kn |
The number of knots on which to build the spline function |
cyclic |
A TRUE/FALSE value stating whether the spline function should be constrained to be cyclic or not |
c_init |
(optional) If provided this is a scalar that tell us initial constant value from which to start the search for the optimal spline coefficients. |
plot |
(optional) If provided this is says whether to output a pplot or not. If you do not want a plot do not use this parameter, if you do make pplot=0 |
Opt_Spl_Coeffs - The optimised spline coefficients
Knots - The knots on which the spline function was built
1 2 3 4 5 6 7 8 9 | ## Fitting the spline-based intensity given arrivals from a cyclic sinusoidal
data(Arrs)
data(n_Arrs)
m<-length(n_Arrs)
Tstart<-0
Tend<-24
kn<-50
cyclic=TRUE
spl_Fit(as.numeric(Arrs),m,as.numeric(n_Arrs),Tstart,Tend,kn,cyclic,pplot=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.