Running 'glk-lok-new.R' [156s]
  Running 'glk1.R' [1s]
  Comparing 'glk1.Rout' to 'glk1.Rout.save' ... OK
  Running 'infloop-bug.R' [1s]
  Running 'lok1.R' [153s]
Running the tests in 'tests/glk-lok-new.R' failed.
Complete output:
  > require(lokern)
  Loading required package: lokern
  > data(xSim)
  > (n <- length(xSim))
  [1] 75
  > summary(xSim)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -3.1323 -1.6148  0.7583  0.3969  1.7713  4.4505 
  > tt <- ((1:n) - 1/2)/n # equidistant x
  > 
  > lk  <- lokerns(tt, xSim, trace=1)
  lokerns (n=75,m=300; nue=0, isrand=1, inputp=0) -> kord=2
   phase  2
   phase  3
   phase  4
   40: itt=0, (il=1, iu=75) -  (tl=1, tu=0)
   phase  5
   phase  6
   phase  7
   phase  8
   phase  9
   phase 10
    100: (il=6, iu=70) -> vi=0.115996
   phase 11
   kernel(n= 75, m= 76, ny=0 => global bandw.; b=0.01000531) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 12
   phase 18
   phase 19
   phase 20
   kernel(n= 75, m=300, ny=1 => local bandw.; b=0.04845241) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 21
   kernel(n= 75, m=399, ny=0 => global bandw.; b= 0.0611626) -> (chg.pt,cut_b)=( 9.0, 0.12) => 'classic'
   kernp(n=399, m=300, ny=1 => local bandw.; b=  0.086814) -> (chg.pt,cut_b)=( 8.1, 0.02) => 'fast O(n)'
    kernfp(n=399, b=  0.086814, nue=0, kord=2, ny=1, m=300):
   phase 22
   phase 23
   kernel(n= 75, m=300, ny=1 => local bandw.; b=0.04845241) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
  > head(x. <- seq(-3.5, 4.5, length=1001))
  [1] -3.500 -3.492 -3.484 -3.476 -3.468 -3.460
  > lk.  <- lokerns(tt, xSim, x.out= x., trace=1)
  lokerns (n=75,m=1001; nue=0, isrand=1, inputp=0) -> kord=2
   phase  2
   phase  3
   phase  4
   40: itt=0, (il=1, iu=75) -  (tl=1, tu=0)
   phase  5
   phase  6
   phase  7
   phase  8
   phase  9
   phase 10
    100: (il=6, iu=70) -> vi=0.115996
   phase 11
   kernel(n= 75, m= 76, ny=0 => global bandw.; b=0.01000531) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 12
   phase 18
   phase 19
   phase 20
   kernel(n= 75, m=1001, ny=1 => local bandw.; b=0.04845241) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 21
   kernel(n= 75, m=399, ny=0 => global bandw.; b= 0.0611626) -> (chg.pt,cut_b)=( 9.0, 0.12) => 'classic'
   kernp(n=399, m=1001, ny=1 => local bandw.; b=  0.086814) -> (chg.pt,cut_b)=( 7.0, 0.14) => 'classic'
   phase 22
   phase 23
   kernel(n= 75, m=1001, ny=1 => local bandw.; b=0.04845241) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
  > lkw <- tryCatch(lokerns(tt, xSim, x.out= x., x.inOut="aim"),
  +                 warning = function(.) .)
  > stopifnot(inherits(lkw, "simpleWarning"),
  + 	  grepl("x.inOut", lkw[["message"]]))
  > 
  > lkn. <- lokerns(tt, xSim, n.out= 1000, x.inOut=FALSE)
  > lknT <- lokerns(tt, xSim, n.out= 1000, x.inOut=TRUE)
  > lkn1 <- lokerns(tt, xSim, n.out= 1000, x.inOut="aim")
  > lkn2 <- lokerns(tt, xSim, n.out= 1000, x.inOut="simple")
  > lkn3 <- lokerns(tt, xSim, n.out= 1000, x.inOut="interpolate")
  > 
  > iO <- which("call" != names(lkn.))
  > stopifnot(all.equal(lknT[iO],
  + 		    lkn1[iO], tol=1e-12),
  +           inherits(try(residuals(lkn.), silent=TRUE), "try-error"),
  +           length(residuals(lkn1)) == length(tt),
  +           length(fitted   (lkn2)) == length(tt),
  +           TRUE)
  > pdf("lok-xout-ex.pdf")
  > 
  > plot(tt, xSim, main = "data + 4 different lokerns(.., x.inOut = *)")
  > lines(est~x.out, data=lk. [c("x.out", "est")])
  > lines(est~x.out, data=lkn1[c("x.out", "est")], col=2)
  > lines(est~x.out, data=lkn2[c("x.out", "est")], col=3)
  > lines(est~x.out, data=lkn3[c("x.out", "est")], col=4)
  > mtext("(you should not see different curves -- rather perfectly overlap")
  > 
  > gkn. <- glkerns(tt, xSim, n.out= 1000, x.inOut=FALSE)
  > gknT <- glkerns(tt, xSim, n.out= 1000, x.inOut=TRUE)
  > gkn1 <- glkerns(tt, xSim, n.out= 1000, x.inOut="aim")
  > gkn2 <- glkerns(tt, xSim, n.out= 1000, x.inOut="simple")
  > gkn3 <- glkerns(tt, xSim, n.out= 1000, x.inOut="interpolate")
  > 
  > plot(tt, xSim, main = "data + 4 different glkerns(.., x.inOut = *)")
  > lines(est~x.out, data=gkn.[c("x.out", "est")])
  > lines(est~x.out, data=gkn1[c("x.out", "est")], col=2)
  > lines(est~x.out, data=gkn2[c("x.out", "est")], col=3)
  > lines(est~x.out, data=gkn3[c("x.out", "est")], col=4)
  > mtext("(you should not see different curves -- rather perfectly overlap")
  > 
  > stopifnot(all(sapply(ls(patt="kn"), function(.)get(.)$sig) -
  + 	      0.145106481 < 5e-10))
  > 
  > cat('Time elapsed: ', proc.time(),'\n') # "stats"
  Time elapsed:  0.39 0.06 0.43 NA NA 
  > 
  > proc.time()
     user  system elapsed 
     0.39    0.06    0.43 
Running the tests in 'tests/lok1.R' failed.
Complete output:
  > require(lokern)
  Loading required package: lokern
  > data(xSim)
  > (n <- length(xSim))
  [1] 75
  > summary(xSim)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -3.1323 -1.6148  0.7583  0.3969  1.7713  4.4505 
  > tt <- ((1:n) - 1/2)/n # equidistant x
  > 
  > str(lk <- lokerns(tt, xSim, trace=TRUE))
  lokerns (n=75,m=300; nue=0, isrand=1, inputp=0) -> kord=2
   phase  2
   phase  3
   phase  4
   40: itt=0, (il=1, iu=75) -  (tl=1, tu=0)
   phase  5
   phase  6
   phase  7
   phase  8
   phase  9
   phase 10
    100: (il=6, iu=70) -> vi=0.115996
   phase 11
   kernel(n= 75, m= 76, ny=0 => global bandw.; b=0.01000531) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 12
   phase 18
   phase 19
   phase 20
   kernel(n= 75, m=300, ny=1 => local bandw.; b=0.04845241) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 21
   kernel(n= 75, m=399, ny=0 => global bandw.; b= 0.0611626) -> (chg.pt,cut_b)=( 9.0, 0.12) => 'classic'
   kernp(n=399, m=300, ny=1 => local bandw.; b=  0.086814) -> (chg.pt,cut_b)=( 8.1, 0.02) => 'fast O(n)'
    kernfp(n=399, b=  0.086814, nue=0, kord=2, ny=1, m=300):
   phase 22
   phase 23
   kernel(n= 75, m=300, ny=1 => local bandw.; b=0.04845241) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
  List of 24
   $ x         : num [1:75] 0.00667 0.02 0.03333 0.04667 0.06 ...
   $ y         : num [1:75] 1.97 1.9 1.64 1.43 2.4 ...
   $ x.out     : num [1:300] 0.00667 0.01103 0.0154 0.01976 0.02 ...
   $ est       : num [1:300] 1.87 1.86 1.85 1.85 1.85 ...
   $ nobs      : int 75
   $ n.out     : int 300
   $ deriv     : int 0
   $ korder    : int 2
   $ hetero    : int 0
   $ is.rand   : int 1
   $ inputb    : int 0
   $ iter      : int 15
   $ xl        : num 0.067
   $ xu        : num 0.933
   $ s         : num [1:76] 0.00412 0.01333 0.02667 0.04 0.05333 ...
   $ sig       : num 0.145
   $ bandwidth : num [1:300] 0.0506 0.0501 0.0496 0.0491 0.049 ...
   $ ind.x     : int [1:75] 1 5 9 13 17 21 25 29 33 37 ...
   $ seqXmethod: chr "aim"
   $ m1        : int 400
   $ isOrd     : logi TRUE
   $ ord       : NULL
   $ x.inOut   : logi TRUE
   $ call      : language lokerns.default(x = tt, y = xSim, trace.lev = TRUE)
   - attr(*, "class")= chr [1:2] "lokerns" "KernS"
  > summary(lk$est)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -3.0721 -1.6666  0.7102  0.4164  1.7826  4.2935 
  > summary((lk1 <- lokerns(tt,xSim, deriv = 1))$est)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -41.231  -8.198  -5.577  -4.945  -1.786  35.279 
  > summary((lk2 <- lokerns(tt,xSim, deriv = 2, trace=TRUE))$est)
  lokerns (n=75,m=300; nue=2, isrand=1, inputp=0) -> kord=4
   phase  2
   phase  3
   phase  4
   40: itt=0, (il=1, iu=75) -  (tl=1, tu=0)
   phase  5
   phase  6
   phase  7
   phase  8
   phase  9
   phase 10
    100: (il=6, iu=70) -> vi=0.115996
   phase 11
   kernel(n= 75, m= 76, ny=0 => global bandw.; b=0.00909058) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'classic'
   phase 12
   phase 18
   phase 19
   phase 20
   kernel(n= 75, m=300, ny=1 => local bandw.; b= 0.1190404) -> (chg.pt,cut_b)=( 7.0, 0.09) => 'fast O(n)'
    kernfa(n= 75, b= 0.1190404, nue=0, kord=2, ny=1, m=300):
   phase 21
   kernel(n= 75, m=399, ny=0 => global bandw.; b= 0.1186581) -> (chg.pt,cut_b)=(11.0, 0.15) => 'classic'
   kernp(n=399, m=300, ny=1 => local bandw.; b= 0.1818455) -> (chg.pt,cut_b)=( 8.1, 0.02) => 'fast O(n)'
    kernfp(n=399, b= 0.1818455, nue=0, kord=2, ny=1, m=300):
   phase 22
   phase 23
   kernel(n= 75, m=300, ny=1 => local bandw.; b= 0.1190404) -> (chg.pt,cut_b)=( 9.0, 0.12) => 'classic'
      Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
  -688.691  -74.741   26.413   -4.829  169.492  352.630 
  > 
  > summary(lk  $bandwidth)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.03755 0.04526 0.04911 0.05265 0.06016 0.07838 
  > summary(lk1 $bandwidth)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.05854 0.06545 0.06669 0.06977 0.06927 0.09286 
  > summary(lk2 $bandwidth)
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.07662 0.07995 0.09398 0.09034 0.09501 0.10938 
  > 
  > str(lkH <- lokerns(tt, xSim, hetero=TRUE))
  List of 24
   $ x         : num [1:75] 0.00667 0.02 0.03333 0.04667 0.06 ...
   $ y         : num [1:75] 1.97 1.9 1.64 1.43 2.4 ...
   $ x.out     : num [1:300] 0.00667 0.01103 0.0154 0.01976 0.02 ...
   $ est       : num [1:300] 1.87 1.86 1.85 1.85 1.84 ...
   $ nobs      : int 75
   $ n.out     : int 300
   $ deriv     : int 0
   $ korder    : int 2
   $ hetero    : int 1
   $ is.rand   : int 1
   $ inputb    : int 0
   $ iter      : int 15
   $ xl        : num 0.067
   $ xu        : num 0.933
   $ s         : num [1:76] 0.0041 0.0133 0.0267 0.04 0.0533 ...
   $ sig       : num 0
   $ bandwidth : num [1:300] 0.046 0.0455 0.045 0.0444 0.0444 ...
   $ ind.x     : int [1:75] 1 5 9 13 17 21 25 29 33 37 ...
   $ seqXmethod: chr "aim"
   $ m1        : int 400
   $ isOrd     : logi TRUE
   $ ord       : NULL
   $ x.inOut   : logi TRUE
   $ call      : language lokerns.default(x = tt, y = xSim, hetero = TRUE)
   - attr(*, "class")= chr [1:2] "lokerns" "KernS"
  > 
  > proc.time()
     user  system elapsed 
     0.28    0.10    0.32