Description Details References Examples
The package implements Wild Binary Segmentation, a technique for consistent estimation of the number and locations of multiple change-points in data. It also provides a fast implementation of the standard Binary Segmentation algorithm.
The main routines of the package are wbs
, sbs
and changepoints
.
P. Fryzlewicz (2014), Wild Binary Segmentation for multiple change-point detection. Annals of Statistics, to appear. (http://stats.lse.ac.uk/fryzlewicz/wbs/wbs.pdf)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #an example in which standard Binary Segmentation fails to detect change points
x <- rnorm(300)+ c(rep(0,130),rep(-1,20),rep(1,20),rep(0,130))
s <- sbs(x)
w <- wbs(x)
s.cpt <- changepoints(s)
s.cpt
w.cpt <- changepoints(w)
w.cpt
# in this example, both algorithms work well
x <- rnorm(300) + c(rep(1,50),rep(0,250))
s <- sbs(x)
w <- wbs(x)
s.cpt <- changepoints(s)
s.cpt
w.cpt <- changepoints(w)
w.cpt
|
$sigma
[1] 1.029272
$th
[1] 4.519286
$no.cpt.th
[1] 0
$cpt.th
$cpt.th[[1]]
[1] NA
$Kmax
[1] 0
$sigma
[1] 1.029272
$th
[1] 4.519286
$no.cpt.th
[1] 2
$cpt.th
$cpt.th[[1]]
[1] 152 169
$Kmax
[1] 50
$ic.curve
$ic.curve$ssic.penalty
[1] 11.018264 15.512512 10.898690 9.615187 15.249862 13.531978
[7] 18.738644 23.281474 28.886798 34.689809 35.882492 37.721583
[13] 41.146762 42.592433 46.818434 51.590881 57.177981 58.441234
[19] 61.924867 64.578647 70.347626 72.052011 75.181340 79.555743
[25] 85.114531 89.846461 91.982587 94.087465 98.913449 101.039549
[31] 103.191180 108.118144 110.571811 114.452370 119.934168 125.665796
[37] 130.950340 134.746321 137.283526 139.786685 145.535243 147.620379
[43] 150.088190 152.534167 155.142512 158.401231 161.554769 165.857972
[49] 168.666291 172.754812 175.585448
$ic.curve$bic.penalty
[1] 11.018264 15.412332 10.698330 9.314648 14.849143 13.031079
[7] 18.137565 22.580215 28.085359 33.788190 34.880694 36.619605
[13] 39.944604 41.290095 45.415916 50.088183 55.575104 56.738176
[19] 60.121630 62.675230 68.344029 69.948234 72.977384 77.251607
[25] 82.710215 87.341965 89.377911 91.382609 96.108413 98.134334
[31] 100.185785 105.012569 107.366056 111.146436 116.528054 122.159501
[37] 127.343866 131.039667 133.476692 135.879671 141.528050 143.513006
[43] 145.880636 148.226434 150.734599 153.893138 156.946496 161.149519
[49] 163.857658 167.845999 170.576456
$ic.curve$mbic.penalty
[1] 11.01826 17.57099 14.21258 14.31462 21.41736 20.13322 26.89478
[8] 32.92624 39.97493 46.99151 48.70809 51.48027 54.78640 56.64822
[15] 61.57876 67.13567 73.10201 74.23944 78.29870 81.47389 88.34164
[22] 89.92259 93.43974 98.42033 104.73479 110.01711 111.98629 113.96659
[29] 119.42905 121.74265 123.65026 129.19877 132.34376 136.93285 142.93184
[36] 149.75306 155.64506 159.62855 161.99881 164.29021 170.68442 172.61669
[43] 175.20524 177.51877 180.29643 184.35085 187.34532 191.82815 194.71463
[50] 199.49447 202.11335
$cpt.ic
$cpt.ic$ssic.penalty
[1] 152 169 129
$cpt.ic$bic.penalty
[1] 152 169 129
$cpt.ic$mbic.penalty
[1] NA
$no.cpt.ic
ssic.penalty bic.penalty mbic.penalty
3 3 0
$sigma
[1] 1.155001
$th
[1] 5.071335
$no.cpt.th
[1] 1
$cpt.th
$cpt.th[[1]]
[1] 52
$Kmax
[1] 1
$sigma
[1] 1.155001
$th
[1] 5.071335
$no.cpt.th
[1] 1
$cpt.th
$cpt.th[[1]]
[1] 52
$Kmax
[1] 50
$ic.curve
$ic.curve$ssic.penalty
[1] 13.897055 -1.487344 3.331035 1.052656 6.840982 9.183526
[7] 8.187780 13.672713 17.904162 21.170785 25.932063 26.802654
[13] 29.533270 31.383581 36.235627 37.834866 40.179655 40.985548
[19] 45.809356 51.216053 53.772097 59.574599 61.489203 67.146386
[25] 71.805567 73.990793 79.794753 82.154460 85.842462 90.116303
[31] 92.570573 98.199939 102.556210 108.294153 108.979470 113.048958
[37] 115.911648 118.824793 121.860384 124.699980 128.839638 131.797724
[43] 135.786375 139.340983 143.922313 149.618517 154.188657 158.173319
[49] 161.322243 164.507691 168.256113
$ic.curve$bic.penalty
[1] 13.8970547 -1.5875238 3.1306756 0.7521164 6.4402627 8.6826271
[7] 7.5867006 12.9714541 17.1027228 20.2691659 24.9302646 25.7006755
[13] 28.3311123 30.0812431 34.8331092 36.3321685 38.5767771 39.2824911
[19] 44.0061185 49.3126364 51.7685004 57.4708227 59.2852470 64.8422500
[25] 69.4012504 71.4862972 77.1900768 79.4496039 83.0374268 87.2110872
[31] 89.5651780 95.0943635 99.3504554 104.9882180 105.5733551 109.5426637
[37] 112.3051737 115.1181385 118.0535500 120.7929659 124.8324446 127.6903507
[43] 131.5788213 135.0332496 139.5144000 145.1104240 149.5803842 153.4648660
[49] 156.5136105 159.5988786 163.2471212
$ic.curve$mbic.penalty
[1] 13.8970547 0.2929212 6.3015954 4.5391081 12.2611830 16.0389098
[7] 15.2812234 22.2320772 27.8430282 31.5414347 37.0618114 38.4562943
[13] 41.2305722 43.9009777 49.8552757 52.0474822 55.2819968 57.0713326
[19] 62.8438553 69.0007671 71.4486309 78.1675793 80.2170054 86.8291150
[25] 92.4894087 94.5590697 100.7645003 103.3205593 107.5606904 112.3504225
[31] 114.6133526 121.3462981 126.4982697 133.0901172 133.6275992 137.9077519
[37] 140.9845662 143.7063703 146.5506210 149.2500156 154.1123970 156.9332491
[43] 161.2798651 165.0373613 170.2617006 176.2042982 181.4557174 186.0577414
[49] 188.7599123 191.8106840 195.3150856
$cpt.ic
$cpt.ic$ssic.penalty
[1] 52
$cpt.ic$bic.penalty
[1] 52
$cpt.ic$mbic.penalty
[1] 52
$no.cpt.ic
ssic.penalty bic.penalty mbic.penalty
1 1 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.