data("bullets")
land2_3 <- bullets$sigs[bullets$bulletland == "2-3"][[1]]
land1_2 <- bullets$sigs[bullets$bulletland == "1-2"][[1]]
x <- land2_3$sig
y <- land1_2$sig
segments <- get_segs(x, len = 50)
# identify the consistent correlation peak when ccf curves are computed
# based on y and segment 7 in 3 different scales;
# the number of peaks identified in each scale are 5, 3, and 1, respectively.
seg_scale_max <- 3
npeaks_set <- c(5,3,1)
outlength <- c(50, 100, 200)
ccr_list <- lapply(1:seg_scale_max, function(seg_scale) {
get_ccr_peaks(y, segments, seg_outlength = outlength[seg_scale], nseg = 7,
npeaks = npeaks_set[seg_scale])
})
get_ccp(ccr_list, Tx = 25)
Run the code above in your browser using DataLab