R version 4.4.0 RC (2024-04-16 r86441 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > 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.17 0.04 0.20