save and use within-subject correlations

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

save and use within-subject correlations

Magnus-30
Hi,

I want to use the within-subject correlation between two variables
(variables x and y) to use as an index to predict another variable in a
regression. My question is how do I create and save these within-subject
correlations in SPSS so I can use them as a variable in other analyses?

=====================
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: save and use within-subject correlations

Clive Downs
>Hi,
>
>I want to use the within-subject correlation between two variables
>(variables x and y) to use as an index to predict another variable in a
>regression. My question is how do I create and save these within-subject
>correlations in SPSS so I can use them as a variable in other analyses?
>

Hi,

I'm not sure I entirely understand what you mean. If you mean you are
generating e.g.  a table of bivariate correlations that are created in the
output window, then one option would be to use OMS (output management
system)from the menu to save the correlations to a .sav format file, that
can then be worked on some more.

If this is the kind of thing you want, I can post some sample syntax
(derived from OMS menu) that would do this.

Regards

Clive.

=====================
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: save and use within-subject correlations

Clive Downs
In reply to this post by Magnus-30
Hi Magnus,

I think the following syntax, incl. sample data, shows one way OMS might be
used, if I've understood your question correctly:

*  1 set up sample data.
DATA LIST FREE/  id(A3)  x y.
BEGIN DATA

001 27 45
002 16 87
003 15 98
END DATA.

* 2  prepare OMS.
DATASET DECLARE correlations.
OMS
 /SELECT TABLES
 /IF COMMANDS = ["Correlations"]
     SUBTYPES = ["Correlations"]
 /DESTINATION FORMAT = SAV NUMBERED = TableNumber_
  OUTFILE = correlations.

* 3  run correlations.
CORRELATIONS
  /VARIABLES=x y
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE .

*  4  run OMS end, as can't access OMS  output until this is done.
OMSEND.
EXE.

HTH

Clive

On Thu, 16 Apr 2009 04:32:09 -0400, Magnus <[hidden email]>
wrote:

>Hi,
>
>I want to use the within-subject correlation between two variables
>(variables x and y) to use as an index to predict another variable in a
>regression. My question is how do I create and save these within-subject
>correlations in SPSS so I can use them as a variable in other analyses?

=====================
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: save and use within-subject correlations

Richard Ristow
In reply to this post by Magnus-30
At 04:32 AM 4/16/2009, Magnus wrote:

>I want to use the within-subject correlation between two variables
>(variables x and y) to use as an index ... How do I create and save
>these within-subject correlations so I can use them as a variable in
>other analyses?

As Clive Downs wrote, use OMS to save the within-subject correlations
for merging back with your data.

Now, how to calculate the correlations? If you're correlating x and y
within a subject, you must have multiple values per subject. To
calculate the correlation, you probably need a 'long' structure, with
a separate SPSS record for each x-y pair. Then, use SPLIT FILES by
'subject' to calculate the correlations separately per subject.

Is this, plus what Clive posted, enough to go on? If not, post
follow-up questions as you need.

-Best wishes,
  Richartd

=====================
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