aat_stimulus_rest {AATtools}R Documentation

Compute stimulus-rest correlations of double-difference scores This function provides a statistic that can give an indication of how deviant the responses to specific stimuli are, in comparison to the rest of the stimulus set. The algorithm computes stimulus-rest correlations of stimulus-specific double-difference scores. It takes single-difference approach-avoidance scores for each stimulus, and computes every possible subtraction between individual stimuli from both stimulus categories. It then computes correlations between every such subtraction of stimuli on one hand, and the mean double difference score of all other stimuli. Stimulus-rest correlations are then computed by averaging every such subtraction-rest correlation involving a specific stimulus.

Description

Compute stimulus-rest correlations of double-difference scores This function provides a statistic that can give an indication of how deviant the responses to specific stimuli are, in comparison to the rest of the stimulus set. The algorithm computes stimulus-rest correlations of stimulus-specific double-difference scores. It takes single-difference approach-avoidance scores for each stimulus, and computes every possible subtraction between individual stimuli from both stimulus categories. It then computes correlations between every such subtraction of stimuli on one hand, and the mean double difference score of all other stimuli. Stimulus-rest correlations are then computed by averaging every such subtraction-rest correlation involving a specific stimulus.

Usage

aat_stimulus_rest(
  ds,
  subjvar,
  stimvar,
  pullvar,
  targetvar,
  rtvar,
  method = c("pearson", "spearman", "kendall")
)

## S3 method for class 'aat_stimulus_rest'
plot(x, ...)

Arguments

ds

a data.frame

subjvar

the label of the participant identifier variable

stimvar

the label of the stimulus identifier variable

pullvar

the label of the movement direction identifier variable

targetvar

the label of the stimulus category identifier variable

rtvar

the label of the reaction time variable

method

Optional, the correlation method to be used (pearson, spearman, kendall)

x

an aat_stimulus_rest object

...

Ignored.

Value

Returns a aat_stimulus_rest object containing statistics for each stimulus. Stats include the average stimulus-rest correlation (mcor); the standard deviation of dyad-rest correlations for this stimulus (sdcor); the number of valid correlations involved in these statistic (n); the average percentile of dyad-rest correlations involving the stimulus within the distribution of all other dyad-rest correlations (restpercentile); as well as z-scores (zpercentile) and p-values for this percentile (pval).

Examples


ds<-aat_simulate()
stimrest<-aat_stimulus_rest(ds,subjvar="subj",stimvar="stim",pullvar="is_pull",
                     targetvar="is_target",rtvar="rt")
plot(stimrest)
print(stimrest)

[Package AATtools version 0.0.2 Index]