Arguments for pyiatΒΆ
pyiat: a Python package to analyze Implicit Association Test (IAT) data
-
analyze_iat(df,subject,rt,correct,condition,cond1,cond2,block,[blocks=[2,3,5,6]],[weighted=True],[fast_rt=400],[slow_rt=10000],[overall_err_cut=.3],[cond_err_cut=.4],[block_err_cut=.4],[overall_fastslowRT_cut=.10],[cond_fastslowRT_cut=.25],[block_fastslowRT_cut=.25],[num_blocks_cutoff=4],[fastslow_stats=False],[biat=False],[biat_rmv_xtrls=4],[biat_trl_num=False],[error_or_correct='correct'],[errors_after_fastslow_rmvd=False],[flag_outformat='pct'],[print_to_excel=False],[each_stim=False],[stimulus=False]):
Parameters: - dataframe df (pandas) – Trial x trial IAT data for each subject
- subject (str) – Column name containing subject number
- rt (str) – Column name containing reaction time (in ms) for each trial
- correct (str) – Column name containing whether trial was correct (where correct = 1, error = 0) (can also use if columns specifies errors; see ‘error_or_correct’ parameter)
- condition (str) – Column name containing condition (e.g. Black-GoodWhite-Bad vs. Black-BadWhite-Good)
- cond1 (str) – Name of first condition (e.g. ‘Black-GoodWhite-Bad’): bias for this condition will result in negative D score
- cond2 (str) – Name of second condition (e.g. ‘Black-BadWhite-Good’): bias for this condition will result in positive D score
- block (str) – Column that contains block information
- blocks (list) – A list containing the numbers corresponding to the relevant blocks, default : [2,3,5,6]
- weighted (Boolean) – If True return weighted D scores; if False return unweighted D scores, default : True
- fast_rt (int) – Reaction time (in ms) considered too fast, default: 400
- slow_rt (int) – Reaction time (in ms) considered too slow, default: 10000
- overall_err_cut (float) – Cutoff for subject exclusion: overall error rate (decimal), default : .3
- cond_err_cut (float) – Cutoff for subject exclusion: error rate (decimal) within each condition, default : .4
- block_err_cut (float) – Cutoff for subject exclusion: error rate (decimal) within a single block, default : .4
- overall_fastslowRT_cut (float) – Cutoff for subject exclusion: overall rate of trials with too fast or too slow RT (decimal), default : .1
- cond_fastslowRT_cut (float) – Cutoff for subject exclusion: rate of trials with too fast or too slow RT (decimal) within each condition, default : .25
- block_fastslowRT_cut (float) – Cutoff for subject exclusion: rate of trials with too fast or too slow RT (decimal) within each block, default : .25
- num_blocks_cutoff (int) – Cutoff for subject exclusion: Minimum number of blocks required, default : 4
- error_or_correct (str) – Enter ‘error’ to enter a column for ‘correct’ where error = 1, correct = 0, default: ‘correct’
- errors_after_fastslow_rmvd (Boolean) – If True calculates error rates after removing all fastslow trials (similar to R package iat); if False error rates calculated with all trials, default : False
- fastslow_stats (Boolean) – Return a second dataframe containing the number and percentage of fastslow trials across all subjects and across subjects with usable data, default : False
- biat (Boolean) – Enter True if analyzing a Brief Implicit Assoc Test (BIAT), False if regular IAT, default : False
- biat_rmv_xtrls (int) – Number of trials to remove from beginning of each block. BIAT recommendad scoring procedures (Nosek et al. 2014) remove first 4 trials of each block b/c they are practice trials but not all BIAT have practice trials, default : 4
- biat_trl_num (str) – The name of the column that contains trial number, default : False
- flag_outformat (str) – Can enter ‘count’ to return number of errors and too fastslow trials (if fastslow_stats set to True), default : ‘pct’
- print_to_excel (Boolean) – Print an excel workbook that contains output, default : False
- each_stim (Boolean) – Return D scores for each individual stimulus (i.e. word), default : False
- stimulus (Boolean) – If each stim = True, then give name of column containing each stimulus (i.e. word), default : False
Returns: pandas DataFrame