
builtfunc
evaluates all the functions describing a generic Gaussian Diffusion process X(t) (drift, infinitesimal variance, mean, variance and first derivative of the transition density); it also evaluates the threshold function and its time derivative, both required in the evaluation of the kernel function of the Volterra integral equation for the FPT pdf (Buonocore 1987).
a(t)
b(t)
cc(t)
S(t)
Sp(t)
a1(x, t)
a2(t)
mdt(t,y,tau)
vdt(t,tau)
fdt(x,t,y,tau)
psi (t, y, tau)
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
delta <- 0.5
time.vec <- seq(0, by=delta, 100)
# linear threshold
Scost <- 6
Sslope <- 0.2
# user provided function (see examples in demo folder)
SSS <- function(t) {
SSS <- Scost + Sslope*t
}
Slin <- S(time.vec)
plot(time.vec,Slin,type='l',xlab='time',ylab='threshold',main='linear threshold')
# periodic threshold
S0 <- 0
S1 <- 2
Sfr <- 0.5
# user provided function (see examples in demo folder)
SSS <- function(t) {
SSS <- S1*cos(Sfr*t+S0)
}
Sper <- S(time.vec)
plot(time.vec,Sper,type='l',xlab='time',ylab='threshold',main='periodic threshold')
Run the code above in your browser using DataLab