## This script analyzes no-choice data when only maskers were presented. # By running this script, you will be able to make figures used in Figure S3 # Read packages library("dplyr") library("ggplot2") library("binom") library("geepack") library("emmeans") library("circular") ## Read circular data collected from responses of subjects to maskers alone masker_orientation <- read.csv("FigureS2_CicrularData_MaskerOnly.csv",header = T, check.names=F) # full data # When maskers are in BP range (2.1kHz - 2.8kHz) masker_orientation_BP <- masker_orientation %>% filter(Masker_frequency == "2.1kHz-2.8kHz") # Plot Informational masker circular plot (Fig S3A left) masker_orientation_BP_IM <- masker_orientation_BP %>% filter(Masker_type == "IM") masker_orientation_BP_IM <- masker_orientation_BP_IM %>% filter(!is.na(Angle)) # Eliminating subjects that did not touch the wall masker_circular_BP_IM <- circular(masker_orientation_BP_IM$Angle, units = "degrees", template = NULL) plot.circular(masker_circular_BP_IM, stack = TRUE,pch = 20, lwd= 1.8,sep = 0.08, shrink = 2, col= "#E69F00", tcl = 0.025, tcl.text = 0.125) # 0 represents position of speaker # Plot Control energetic masker (Fig S3A right) masker_orientation_BP_EM <- masker_orientation_BP %>% filter(Masker_type == "EM") masker_orientation_BP_EM <- masker_orientation_BP_EM %>% filter(!is.na(Angle)) # Eliminating subjects that did not touch the wall masker_circular_BP_EM <- circular(masker_orientation_BP_EM$Angle, units = "degrees", template = NULL) plot.circular(masker_circular_BP_EM, stack = TRUE,pch = 20, lwd= 1.8,sep = 0.08, shrink = 2, col= "#56B4E9", tcl = 0.025, tcl.text = 0.125) # 0 represents position of speaker # When maskers are in AP range (0.7kHz - 1.4kHz) masker_orientation_AP <- masker_orientation %>% filter(Masker_frequency == "0.7kHz-1.4kHz") # Plot Informational masker circular plot (Fig S3B left) masker_orientation_AP_IM <- masker_orientation_AP %>% filter(Masker_type == "IM") masker_orientation_AP_IM <- masker_orientation_AP_IM %>% filter(!is.na(Angle)) # Eliminating subjects that did not touch the wall masker_circular_AP_IM <- circular(masker_orientation_AP_IM$Angle, units = "degrees", template = NULL) plot.circular(masker_circular_AP_IM, stack = TRUE,pch = 20, lwd= 1.8,sep = 0.08, shrink = 2, col= "#E69F00", tcl = 0.025, tcl.text = 0.125) # 0 represents position of speaker # Plot Control energetic masker (Fig S3B right) masker_orientation_AP_EM <- masker_orientation_AP %>% filter(Masker_type == "EM") masker_orientation_AP_EM <- masker_orientation_AP_EM %>% filter(!is.na(Angle)) # Eliminating subjects that did not touch the wall masker_circular_AP_EM <- circular(masker_orientation_AP_EM$Angle, units = "degrees", template = NULL) plot.circular(masker_circular_AP_EM, stack = TRUE,pch = 20, lwd= 1.8,sep = 0.08, shrink = 2, col= "#56B4E9", tcl = 0.025, tcl.text = 0.125) # 0 represents position of speaker