Creation of variables using first and last cases

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

Creation of variables using first and last cases

Mary Spooner
Can you explain how I might create 2 new variables, one being the first test score and the second being the second test score.  I am trying to determine the differences in scores on a test with 45 questions.  The scores are 0, 1, 2, 3.  Each child has more than one test but I only want to select the first and the last test to see if there is improvement.  The data are saved with column headings 1 through 45 with the score on each question in the cell below by child.  Can you guide me on creation of a syntax? I am a newbie to SPSS.
Thanks so much.
Mary
Reply | Threaded
Open this post in threaded view
|

Re: Creation of variables using first and last cases

Maguin, Eugene
Mary,

I am confused by the structure of your dataset. You have multiple scores per
kid. It sounds like you have item level data. I think your structure could
be

ID Admin Q1 .... Q45
23  1     2        3
23  2     1        0
23  3     3        2
17  1     0        1
17  2     0        2

If this is your data structure then you should review the documentation for
Aggregate. As this is the procedure you need. The key subcommands are first
and last

Aggregate outfile=*/break=id admin/fq1 to fq45=first(q1 to q45)/
   lq1 to lq45=last(q1 to q45).

Gene Maguin


>>Can you explain how I might create 2 new variables, one being the first
test score and the second being the second test score.  I am trying to
determine the differences in scores on a test with 45 questions.  The scores
are 0, 1, 2, 3.  Each child has more than one test but I only want to select
the first and the last test to see if there is improvement.  The data are
saved with column headings 1 through 45 with the score on each question in
the cell below by child.  Can you guide me on creation of a syntax? I am a
newbie to SPSS.
Thanks so much.
Mary

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