-
Notifications
You must be signed in to change notification settings - Fork 4
5. RSA
Scripts to run representational similarity analysis on MEG data. (This section is in progress and hasn't been fully tested.)
create_rdm
Creates a representational dissimilarity matrix (RDM) based on pairwise Euclidean distances. Options control whether RDM is temporally/spatiotemporally resolved. The RDM is saved as a symmetric matrix and as a vector (the lower sub-diagonal triangle, which will be used in analysis). Input is channel/source x time x trial
data.
crossval_ED
Calculates cross-validated Euclidean distances based on stimulus x features
matrices divided into a training and a testing set. Cross-validating distances is thought to lead to more reliable estimates when data is noisy, see Guggenmos et al., 2018.
time_resolved_RSA
Runs temporally/spatiotemporally resolved Spearman's rank correlations between a MEG RDM and one or more model RDMs.
randomize_RSA
Randomizes the MEG RDM a specified number of times and reruns the correlation to get a null distribution. This can be OK for fixed effects, but it's quicker to do a sign-shuffling test, and the functions in Stats can be used for correlation too as long as the right 'chance' level of 0 is specified.
get_noise_ceiling
Uses a leave-one-subject-out and averaging approach to calculate lower and upper bounds of the noise ceiling (Nili et al., 2014). Input RDM is features x subjects
.
time_resolved_noise_ceiling
As above, but calculates a time/space-resolved noise ceiling. Input is a 3D RDM.