Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

variable manipulation

6 views
Skip to first unread message

Jared Friedman

unread,
Mar 4, 2010, 10:22:07 AM3/4/10
to
I have a master file, filled with about 3500 variables.

It is a study that has about 200 variables for each subject for one
week of the study
the study is 10 weeks long, which is why there are so many variables
I am trying to amalgamate 23 variables from one spss file, and 6 from
another spss file, into the master file.

Also, is there a way to make sure they are in the same spot and same
order for each week?

my data looks like this

pr1_sol
pr1_wow
pr1_yet
ETC...

I need to keep all of the pr1 is what needs to change, to pr2,
pr3...pr0 (for 10 weeks) but the acronomys for the variables need to
stay the same

IF THERE is a way to add the data values for those variables too, that
would be great.

Is syntax the best way to approach this problem?

Rich Ulrich

unread,
Mar 4, 2010, 11:10:53 PM3/4/10
to
On Thu, 4 Mar 2010 07:22:07 -0800 (PST), Jared Friedman
<jar.fr...@gmail.com> wrote:

>I have a master file, filled with about 3500 variables.
>
>It is a study that has about 200 variables for each subject for one
>week of the study
>the study is 10 weeks long, which is why there are so many variables

A large amount of time of any analysis project seems to be
the checking and validation of data. So it seems essential, to
me, to start with a basic organization of the weekly data into
a file with weekly records. That also makes it convenient - if
not essential for accuracy - for scoring up Factors, Totals,
composites, etc.

>I am trying to amalgamate 23 variables from one spss file, and 6 from
>another spss file, into the master file.

You want to do Match Files? First joint the 23 with the 6.
With Table= for the file with 29, FILE= names the
file with repeated lines. (Unless I got it backwards.)


>
>Also, is there a way to make sure they are in the same spot and same
>order for each week?

When you name the variables explicitly with a SAVE,
the result has them in the order named.

I would set up 10 XSAVE FILE= lines with
the explicit list of variables for each, using an
editor to change the suffixes; and use RENAME
to give them all a name without any suffix.


If or when you want some variables in one file again --
You put the suffix back when you have the dozen or
so variables -- total scores, etc., that you actually
want to use in analyses. Or it comes back with you
use the CASESTOVARS procedure.

>
>my data looks like this
>
>pr1_sol
>pr1_wow
>pr1_yet
>ETC...
>
>I need to keep all of the pr1 is what needs to change, to pr2,
>pr3...pr0 (for 10 weeks) but the acronomys for the variables need to
>stay the same
>
>IF THERE is a way to add the data values for those variables too, that
>would be great.
>
>Is syntax the best way to approach this problem?

--
Rich Ulrich

0 new messages