0
votes
$\begingroup$

In an experiment we measured 100 response times for each subject. The data has the following format:

ID    Trial    ResponseTime    ResponseTime(Z)
1     1            1000             ...
1     2            1200
1     3            1100
.     .               .
.     .               .
.     .               .
2     1             700
2     2             900
2     3             800

In SPSS I would like to compute the cross-correlation between participants' performance for the (z-transformed) time series:

Trial (x)    1    2    3
ID1 (y1)    1000 1200 1100
ID2 (y2)    700   900  800

Upon visual inspection the time-series appear similar but lagged. I wish to use the SPSS cross-correlations command, but need to reformat the data prior to input to allow comparisons across trials between subjects. How should I reformat the data?

Solutions in SPSS, R, or MATLAB are welcome.

$\endgroup$
1
vote
$\begingroup$

The solution was to use the Restructure command:

SORT CASES BY Trial .
CASESTOVARS
    /ID=Trial
    /GROUPBY=VARIABLE.
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.