- Install xcode:
xcode-select --install
- gfortran compiler may also be needed, install from here
- Start by downloading the scripts. The easiest option is to select: Code > Download Zip
- Once downloaded extract the PCI_Analysis folder to wherever you want the code to be.
- Open the folder containing the code and select the PCI_Analysis.RProj file.
- This should open up the PCI_Analysis project within RStudio
- You should receive a message about
renv
not being installed, and then RStudio will install it for you and restart the session
- Once renv is installed you need to get the dependencies for the project, you can do this by executing
renv::restore()
in the RStudio console - Once the dependencies are installed then you are ready to run the script
Currently there is a single script that runs all the processing steps, this is PCI_analysis.R, this will:
- Extract events from the raw data and produce a summary of these events
- Save all the individual looks in an RData file
- Extract the mutual looks from the data
- Extract all the handling and looking events that overlap with a naming event, and return a detailed list and a count of each type of overlap for each naming event
To run this script, ensure that all the raw data (.txt files) is placed in the data/raw_data directory. Then open and run the PCI_analysis.R script.
Specific analysis variables can be altered by the user in the PCI_uservars.R
file.
Not currently implemented These allow specific analyses to be toggled on and off depending on user preference.
events_summary
: Provide summary statistics for events specified inbehav_names
variableprocess_looks
: Process and provide summaries for mutual look eventsprocess_naming
: Process and provide summaries for naming events
Remove any events coded as ambiguous before any further processing
Treat bookreading events as offCamera and remove them
Specifies the maximum size of frame gap between two proximal events, a gap equal to or less than between two events will result in them being merged
Specify location of input and output directories
raw_data_path
: Location of raw data (in)looks_data_path
: Location of looks data (out)naming_data_path
: Location of naming data (out)event_data_path
: Location of event data (out)
Specify the search pattern for the raw data
Regex string for extracting the participant ID
Defines the behaviours that should be summarised
Not 100% sure why I included this one, will double check and update
Variables that define the target and comparison events for overlapping event analysis
Variable that defines the column names and types in the data
Use the PCI_IRR.R
script to run.
User variables can be found in the PCI_uservars.R
.
See data/IRR
for readme.