restructuring problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

restructuring problem

Mark Enters-2
Hi everyone,

I was wondering if anyone can help me with this problem. I have a
dataset structured like this

        test1   test2   test3
Doz1
Doz1
Doz2
Doz3
Doz3
Doz4
Doz4
Doz4

For every person (case) I do have various results for different tests.

Now, what I would like to have is a correlation matrix that looks like this:

test1
        Doz1    Doz2    Doz3    Doz4    Doz5
Doz1
Doz2
Doz3
Doz4
Doz5

For each test I want the correlations between my candidates.

I fail in restructuring/rearranging my dataset to achieve this.

Any help is therefore very much appreciated!

Mark

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: restructuring problem

Maguin, Eugene
Mark,

I don't quite understand what you are describing.

>>I was wondering if anyone can help me with this problem. I have a dataset
structured like this

        test1   test2   test3
Doz1
Doz1
Doz2
Doz3
Doz3
Doz4
Doz4
Doz4

So, are you saying that 'Doz1' is person 1, 'Doz2' is person 2? Therefore,
in your example data, person 1 has two sets of scores on tests 1, 2, and 3
but that person 2 has only one set of scores. Would this be true? And, in
the case of persons 1, 3 and 4, the score for test 1 is the score on the
same test. Would this also be true?


>>For every person (case) I do have various results for different tests.

Now, what I would like to have is a correlation matrix that looks like this:

test1
        Doz1    Doz2    Doz3    Doz4    Doz5
Doz1
Doz2
Doz3
Doz4
Doz5

For each test I want the correlations between my candidates.


OK. More questions. Correlations are defined across persons. Think about the
formulas for covariance and variance. Given that, how does your request for
a correlation matrix make sense? Are you giving 'correlation matrix' a
different computational meaning? Also, your layout above suggests to me that
you might plan to repeat the computation for test 2 and test 3. Would this
be true? Lastly, some persons have multiple scores for tests 1 thru 3. How
does this fact enter into the above table?

All that said. You could compute the 'association' between persons across
tests (Note that a 'correlation' is the association between variables,
tests, in your case, across persons.) You could do that, I think, if you
first did a casetovars command to restructure your dataset so that some
persons had 6 tests (persons 1 and 3), some had 3 tests (person 2) and some
had 9 tests (person 4). Then FLIP (the command) your dataset to interchange
rows and columns. Then you'd compute correlations between persons as

Correlations doz1 to doz4.

Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD