Difference between revisions of "Behavioral toolbox"
Line 61:  Line 61:  
* <code><nowiki>plot_spc.m</nowiki></code> plots the output of <code><nowiki>spc.m</nowiki></code> OR <code><nowiki>pfr.m</nowiki></code>  * <code><nowiki>plot_spc.m</nowiki></code> plots the output of <code><nowiki>spc.m</nowiki></code> OR <code><nowiki>pfr.m</nowiki></code>  
−  [[Data_Archive]]  +  
+  
+  ''Click'' [[Data_Archivehere]] ''to visit the [[Data_Archive]].''  
[[Category:public]]  [[Category:public]] 
Revision as of 14:41, 30 July 2015
Download Here: behavioral_toolbox_release1.01.zip
Introduction
Welcome to the Behavioral Toolbox Release 1!
On this page, you can download the first release of the behavioral toolbox, which contains lab's core functions for performing analyses on behavioral data of free recall. These scripts were written for use with Matlab version 7.5 (R2007b), but should work with any recent version of Matlab. The directory and subdirectories containing the behavioral toolbox functions must be in your Matlab path in order for these functions to work properly.
This release also comes with a detailed readme.txt file, and each function has detailed documentation. Nonetheless, there are some points about the toolbox that are worth reiterating here.
This toolbox has three main directories:
 Analyses: core analysis functions, which calculate the following per participant:

p_rec.m
: probability of recall. 
spc.m
: serial position curve. 
pfr.m
: probability of first recall as a function of serial position. 
lag_crp.m
: conditional response probability as a function of lag. 
pli.m
: number of priorlist intrusions recalled. 
xli.m
: number of extralist intrusions recalled. 
temp_fact.m
: temporal clustering score. 
dist_fact.m
: distance clustering score, based on a distance matrix provided by the user (most commonly, the distance matrix is an LSA matrix so that this function can be used to determine semantic clustering).

 Plots: makes graphs from the outputs of select Analyses functions.
 Helpers: many of these functions are just used internally for the functions in the Analyses directory, but some particularly useful functions are described in more detail below.
Analyses
Most of the Analyses functions expect the associated information from a free recall study to be in a particular format, and provide output in a particular format as well.
Inputs
In a free recall study, each trial has certain information associated with it: the items presented, the items recalled, the corresponding subject.
Combined across all such trials, one can generate matrices where each row represents a trial, each column represents a recalled item. Specifically, column i represents output position i, and if no item was recalled for that output position, it is simply left as 0. Two main ways of representing these recalls are to index recalled items by the serial position for that presented list: integers from 1 to the listlength (referred to as recalls_matrix in toolbox functions). Another way is to index items by their number in the word pool (rec_itemnos). The latter allows for more detailed information to be extracted, such as if any items recalled were priorlist intrusions.
Corresponding to each trial row, one can also generate matrices with each of the items presented according to their number in the wordpool (pres_itemnos).
Critical to most functions is a vector where each row corresponds to the number of the subject for that trial (subjects).
To facilitate analyses of extralist and priorlist intrusions, many functions expect as input a matrix with intrusion information (intrusions). Briefly, an item recalled as an extralist intrusion is indexed as 1, and a priorlist intrusion is indexed by a positive integer indicating the number of lists back from which it occurred. For the specifics of how this matrix can be created and is designed, see helpers/matrixops/make_intrusions.m
.
Outputs
All of the functions in this release output a number or a set of numbers for each participant, depending on the analysis. When the analysis outputs one number per participant (e.g. p_rec.m
), the output is a vector, where each row corresponds to the number for one participant. The numbers are listed according to the ascending order of subject numbers. When the analysis outputs more than one number per subject, the rows still correspond to the ascending order of subject numbers, and the columns index the different values for the analysis for that one subject (e.g. the columns indicate probability of recall at ascending serial positions for the output of spc.m
).
Helpers
Many of the functions in the Helpers subdirectories are internal functions meant to supplement the functions provided in the Analyses folder. For Release 1, only the functions in the Masks directory and the function make_intrusions.m
in the Matrixops folder are designed to be explicitly called upon by the user. make_intrusions.m
was described above in the Inputs section of this file, and Masks are described in more detail below.
Masks
Masks are matrices with logical elements used to 'mask' out particular recalled and/or presented items. For instance, suppose we are only interested in recall of the oddnumbered items. One could simply create a mask the same size as pres_itemnos, where all evennumbered items are false, and all oddnumbered items are true. One could then create a similar mask for the recalled items, and then pass these two masks into the appropriate analysis function.
NOTE: Many functions make default masks if they are not provided by the user.
Plot
The plot functions have been designed especially to take the output of functions from the Analyses folder of the Behavioral Toolbox Release 1, and turn them into lovely plots. Simply pass in the numbers from those functions, and admire the figures.

plot_crp.m
plots the output oflag_crp.m

plot_spc.m
plots the output ofspc.m
ORpfr.m
Click here to visit the Data_Archive.