@@ -31,10 +31,12 @@ fptsde1d <- function(object, ...) UseMethod("fptsde1d")
3131fptsde1d.default <- function (object ,boundary ,... )
3232 {
3333 class(object ) <- " snssde1d"
34- if (any(! is.expression(boundary ))) stop(" must be expressions of a constant or time-dependent boundary " )
34+ if (any(! is.expression(boundary )))
35+ stop(" must be expressions of a constant or time-dependent boundary " )
3536 R <- data.frame (object $ X )
3637 Bn <- function (t ) eval(boundary )
37- if (object $ x0 == Bn(object $ t0 )) warning(paste(" x0 = S(t0) ==> crossing realized at time" ,object $ t0 ))
38+ if (object $ x0 == Bn(object $ t0 ))
39+ warning(paste(" x0 = S(t0) ==> crossing realized at time" ,object $ t0 ))
3840 F <- lapply(1 : as.numeric(object $ M ),function (i ) stats :: approxfun(time(object ),as.vector(R [,i ])) )
3941 if (as.numeric(object $ x0 ) > Bn(as.numeric(object $ t0 ))){
4042 v1 <- sapply(1 : length(F ),function (i ) ifelse(length(which(R [,i ] < = Bn(time(object ))))== 0 , NA ,min(which(R [,i ] < = Bn(time(object ))))))
@@ -234,11 +236,13 @@ fptsde2d <- function(object, ...) UseMethod("fptsde2d")
234236fptsde2d.default <- function (object ,boundary ,... )
235237 {
236238 class(object ) <- " snssde2d"
237- if (any(! is.expression(boundary ))) stop(" must be expression of a constant or time-dependent boundary " )
239+ if (any(! is.expression(boundary )))
240+ stop(" must be expression of a constant or time-dependent boundary " )
238241 R1 <- data.frame (object $ X )
239242 R2 <- data.frame (object $ Y )
240243 Bn <- function (t ) eval(boundary )
241- if (object $ x0 == Bn(object $ t0 ) | object $ y0 == Bn(object $ t0 ) ) warning(paste(" x0 = S(t0) or y0 =S(t0) ==> crossing realized at time" ,object $ t0 ))
244+ if (object $ x0 == Bn(object $ t0 ) | object $ y0 == Bn(object $ t0 ) )
245+ warning(paste(" x0 = S(t0) or y0 =S(t0) ==> crossing realized at time" ,object $ t0 ))
242246 F1 <- lapply(1 : as.numeric(object $ M ),function (i ) stats :: approxfun(time(object ),as.vector(R1 [,i ])) )
243247 F2 <- lapply(1 : as.numeric(object $ M ),function (i ) stats :: approxfun(time(object ),as.vector(R2 [,i ])) )
244248 if (as.numeric(object $ x0 ) > Bn(as.numeric(object $ t0 ))){
@@ -536,12 +540,14 @@ fptsde3d <- function(object, ...) UseMethod("fptsde3d")
536540fptsde3d.default <- function (object ,boundary ,... )
537541 {
538542 class(object ) <- " snssde3d"
539- if (any(! is.expression(boundary ))) stop(" must be expression of a constant or time-dependent boundary " )
543+ if (any(! is.expression(boundary )))
544+ stop(" must be expression of a constant or time-dependent boundary " )
540545 R1 <- data.frame (object $ X )
541546 R2 <- data.frame (object $ Y )
542547 R3 <- data.frame (object $ Z )
543548 Bn <- function (t ) eval(boundary )
544- if (object $ x0 == Bn(object $ t0 ) | object $ y0 == Bn(object $ t0 ) | object $ z0 == Bn(object $ t0 ) ) warning(paste(" x0 = S(t0) or y0 =S(t0) or z0 =S(t0) ==> crossing realized at time" ,object $ t0 ))
549+ if (object $ x0 == Bn(object $ t0 ) | object $ y0 == Bn(object $ t0 ) | object $ z0 == Bn(object $ t0 ) )
550+ warning(paste(" x0 = S(t0) or y0 =S(t0) or z0 =S(t0) ==> crossing realized at time" ,object $ t0 ))
545551 F1 <- lapply(1 : as.numeric(object $ M ),function (i ) stats :: approxfun(time(object ),as.vector(R1 [,i ])) )
546552 F2 <- lapply(1 : as.numeric(object $ M ),function (i ) stats :: approxfun(time(object ),as.vector(R2 [,i ])) )
547553 F3 <- lapply(1 : as.numeric(object $ M ),function (i ) stats :: approxfun(time(object ),as.vector(R3 [,i ])) )
0 commit comments