This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_n_eb_times <- function(n, segmag) | |
{ | |
eb_times <- get_eb_times(segmag, | |
cutoff = mean(segmag$data$segmentation_magnitude)) | |
out <- segmag$data[segmag$data$time %in% eb_times, ] | |
out <- out[order(out$segmentation_magnitude, decreasing = TRUE),] | |
out[1:n,] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calculation of d_a ("d sub a"). A step-by-step tutorial based on the book: | |
# Macmillan, N. A., & Creelman, C. D. (2004). Detection theory: A user’s guide. | |
# Psychology Press. | |
# | |
# pp. 57ff | |
library(ggplot2) | |
library(plyr) | |
# Create data set |