| Date: | Wed, 3 Apr 1996 15:07:06 -0600 |
| Reply-To: | Jonathan Fry <jon@SPSS.COM> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU> |
| From: | Jonathan Fry <jon@SPSS.COM> |
| Organization: | SPSS Inc. |
| Subject: | Re: Help - how to read these data? |
|---|
David Marso wrote:
>
> Greetings Necia,
> Try this:
> DATA LIST filename / ID Stuff0 to Stuff19 (A19 20F1).
> IF ID=' ' ID=LAG(ID).
> It will propogate the Id into the blank records.
> Regards,
> David Marso
>
> Necia A. Black wrote:
> >
> > Hi folks,
> >
> > I have a nested data file I would like to read, extend information to the
> > "nested records", and then I will be doing some fairly simple things, (I
hope),
> > like aggregation by the grouping variable and some tables. But one step at
> > a time. First how to read. I have read and reread the information on FILE
TYPE
> > END FILE TYPE and NESTED FILES but my CASE variable is a 19 character
alpha-
> > numeric field which either has something from 7 to 91 characters or is
blank.
> > The number of lines under each group varies. Excerpt of the file is:
> >
> > mga201mfc Only thing on first line of
group
> > 12345123451234512345 (it's a class ID)
> > This "ID" can be 54321543215432154321
> > up to 19 charact- 11223344551122334455 These are student evaluation
> > ers long. 32145321453214532145 responses for this class[snip]
> > 53454351353242424242
> > mga202a new class
> > 32145321453214532145
> > 45123451234512345123 next set of evaluations
> > 11335522441133552244
> > 22441133552244113355
> > 1 2 3 4 51122334455[snip]
> > etc. .....
> >
> > The above is how the data are stored in a file when sheets are scanned in
our
> > score machine. Can't do a separate file for each course (too many!!) So a
> > department sends all theirs over but we want separate "reports" for each
> > course. I can "break" on the "ID" variable, that's fine, but how do I read
> > it with such an present/absent ID vairbale?
> >
> > For many, many years we have operated with a home grown Fortran program,
but
> > now that we have a new scoring machine, stand alone without need for the
> > mainframe, we need to produce a report similar to the old one the faculty
are
> > so accustomed to. I am hoping that after I can get the data read with
SPSS,
> > I will be able to write a program to generate what we want in terms of a
> > report.[snip]
--
Necia,
Since some of the records represent classes and others represent test
responses, you
will want to select here. LAG will give you problems in that case. You might
try
input program.
data list .../ #id 1-19(a).
string id (a19).
do if (#id ne ' '). /* class header
compute id = #id.
else. /* test response
reread.
leave id.
data list .../ v1 to v20 20-39.
end case.
end if.
end input program.
The code above creates a file of test responses only.
--------------------
Jonathan Fry
SPSS Inc.
jon@spss.com
|