Projection method download

(please refer to the paper: Tian, X., & Huber, D. (2008). Measures of Spatial Similarity and Response Magnitude in MEG and Scalp EEG. Brain Topography, 20(3), 131-141.)

Our projection method is a simple multivariate measure that can 1) normalize against individual differences by comparison with each individual¡¯s standard response; 2) compare the similarity of spatial patterns in different conditions (similarity test) to ascertain whether the distribution of neural sources is different; and 3) compare the response magnitude between conditions which are sufficiently similar (magnitude test).  This technique is easy to calculate, relatively assumption free, and yield the important psychological measures of similarity and response magnitude.

This projection technique has been implemented in 2 different applications, Matlab and Excel.

Matlab version (download):

'Sqdproject' (a toolbox developed by Dr. Jonathan Z. Simon group) should be downloaded first to import sqd files into matlab (http://www.isr.umd.edu/Labs/CSSL/simonlab/resources/resources.html).

In this folder, you will find 2 Matlab codes and 2 sample data and 1 README file. These codes are written in a semi-automatic way and you can build your own automatic algrithms based on them.

Currently, these matlab codes can only anlayze the data in '.sqd' file format recorded from KIT MEG system (the Kanazawa Institute of Technology, Japan) and pre-analyzed by MEG160 software (obtaining the event-related responses by averaging across trials). You need to download 'sqdproject' developed by Dr. Jonathan Z. Simon group to import sqd files into matlab (http://www.isr.umd.edu/Labs/CSSL/simonlab/resources/resources.html).
After downloading, you need to add the path of 'sqdproject' as well as the folder in which you save these codes in matlab (file-->set path --> add folder).

The following instruction will guide you step by step.

A. similarity test (you need to determine the times of interest in the two to-be-compared responses offline)

1) type 'SimilarityTest' in matlab;
2) following instruction on the command window: importing two MEG data sets;
3) after importing two data sets, a window appears. Enter the time ranges of interest* for both data sets (if both time ranges include 2 or more time points, the two ranges should be equal in length). The algorithm will calculate one angle for each time point pair between these two time ranges;
If one of the time range only includes one time point (i.e., starting time == ending time), the algorithm will calculate angle(s) between this time point and each time point in the time range of another data set;
4) After calculation, you can choose to run more comparison using the same data sets and save results** (the cosine value of the angles between two data sets) into text file that can be opened in EXCEL or SPSS for further analysis. The results are also presented in command window.


B. magnitude test (you need to determine the time point of interest in the standard response and the time range of the to-be-projected data offline )

1) type 'MagnitudeTest' in matlab;
2) following instruction on the command window: importing the sqd file of standard response and the second sqd file;
3) after importing two data sets, a window appears. Enter the time point of interest* for the standard response and the time range of the to-be-projected data. This range of data will be projected onto the direction determined by the standard response at the inputted time.
4) After calculation, you can choose to run more projection using the same data sets and save results** (the magnitude along the direction of the standard response) into text file that can be opened in EXCEL or SPSS for further analysis. The results are also presented in command window.

* time of interest means the real time point in the data set. If this data set includes pre-trigger data, please add the pre-trigger time.
** if you run multiple tests, only the last result will be save.
¡¡

¡¡

Excel version (download):

In this folder, you will find 2 excel templates and 1 sample data set (two columns representing two responses, with each row representing one channel/sensor) and 1 README file.
¡¡

This excel version of projection method can apply to all data obtained from different measures. In order to work on the calculation, you need to organize data as a column vector (the same way as that in the sample data set). That is, each column is one response at given latency and each row represents one channel/sensor. Then, copy and paste data into corresponding column in the templates.

Using SimilarityTest, the cosine value of the angle between two responses can be directly calculated. The MagnitudeTest can only calculate the magnitude of projected value at given latency. If an average magnitude within a time window is needed, multiple calculations can be performed either by repeating this single process or adding multiple columns and extending the existing formula in the worksheet.

Structure:
SimilarityTest: Column A&B, the two to-be-compared responses
Column D-F. intermediate calculation steps
Cell H1: the cosine value of the angle between two responses

MagnitudeTest: Column A: standard response
Column B: response that is to be projected onto standard response
Column D&E: intermediate calculation steps
Cell G1: the magnitude of projected value


Should you have any problem, please contact me. Email: xtian@psyc.umd.edu