Date: Tue, 14 Jan 2003 16:55:50 -0600
Reply-To: Daniel Sharp <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Daniel Sharp <email@example.com>
Subject: Re: compute
Content-Type: text/plain; charset=US-ASCII
Perhaps the Aggregate command will do.
/tot_v1 tot_v2=sum(v1 v2).
this produces one case per subn with tot_v1 and tot_v2 equal to the sum
of each participants values for v1, v2, etc.
>>> Scott Roesch <firstname.lastname@example.org> 01/14/03 04:49PM >>>
I have a data file that looks like the following:
subn v1 v2
1 1 0
1 0 1
1 1 1
2 1 1
2 1 0
2 1 0
so I have multiple subject entries. What I would like to do is simply
each variable for each participant. For example, I would like to create
a new variable that contains the sum of v1 for participants, 1 and 2,
respectively, and so on. I assumed that I would have to transpose this
data. However, the transpose does not work cleanly because participants
not have the same number of scores for v1 (some have 3, some have 5,
etc.). Any help would be greatly appreciated.