chumbley: Chumbley test score

View source: R/chumbley.R

chumbleyR Documentation

Chumbley test score

Description

Chumbley test score

Usage

chumbley(b1, b2, window, reps = 3)

Arguments

b1

dataframe

b2

dataframe

window

width of the window (in indices) to consider for matching

reps

number of replicates to use in the evaluation

Examples

library(dplyr)

data(br411)
b1 <- get_crosscut(x = 250, bullet=br411)
b2 <- get_crosscut(x = 150, bullet = br411)
b3 <- get_crosscut(x = 10, bullet=br411)
b1.gr <- b1 %>% get_grooves(smoothfactor=30)
b2.gr <- b2 %>% get_grooves()
b3.gr <- b3 %>% get_grooves()
# get signatures
b1 <- fit_loess(b1, b1.gr)$data
b2 <- fit_loess(b2, b2.gr)$data
b3 <- fit_loess(b3, b3.gr)$data
match12 <- get_lag_max_R(b1, b2, window = 100, b1.left = 450)
# matched correlations
get_cor(b1, b2, window = 100, b1.left = 800, lag = match12$lag)
get_cor(b1, b2, window = 100, b1.left = 1000, lag = match12$lag)
get_cor(b1, b2, window = 100, b1.left = 1200, lag = match12$lag)
# random correlations
get_cor(b1, b2, window = 100, b1.left = 800, lag = 100)
get_cor(b1, b2, window = 100, b1.left = 1000, lag = -300)
get_cor(b1, b2, window = 100, b1.left = 1200, lag = -500)

chumbley(b1, b2, window=150, reps=5)

match13 <- get_lag_max_R(b1, b3, window = 100, b1.left = 450)
# matched correlations
get_cor(b1, b3, window = 100, b1.left = 800, lag = match13$lag)
get_cor(b1, b3, window = 100, b1.left = 1000, lag = match13$lag)
get_cor(b1, b3, window = 100, b1.left = 1200, lag = match13$lag)
# random correlations
get_cor(b1, b3, window = 100, b1.left = 800, lag = 100)
get_cor(b1, b3, window = 100, b1.left = 1000, lag = 300)
get_cor(b1, b3, window = 100, b1.left = 1200, lag = 500)

chumbley(b1, b3, window=100, reps=5)

erichare/bulletr documentation built on May 3, 2024, 10:14 p.m.