|
<html>
<body>
At 03:55 PM 7/29/2009, Kevan Edwards (MDH) wrote:<br><br>
<blockquote type=cite class=cite cite="">I have several SPSS data files
saved each of which contains information about individuals at different
levels of observation. There is a one to many situation in these
files. For example one file contains information about demographics (1
record per person) another file contains information about utilization of
services (1 record for each office visit) while others contain
information about the person’s health history (1 record for each medical
condition). All files have 1 common linkage field/variable being
the id number of the person. <br>
<br>
My question is, is it possible to link the SPSS .sav files I have for in
which the data records reflect various “levels of observation” to create
a “hierarchical” or “nested” files stricture from the individual SPSS sav
files with that common a key variable (Recipient ID) , and if so, how?
</blockquote><br>
You can't get a hierarchical or nested structure in a single SPSS file.
But it works fine to have separate files for data at each level of
observation; and then summarize (with AGGREGATE) or join (with MATCH
FILES) as you need for analysis.<br><br>
<blockquote type=cite class=cite cite="">The “Nested Files” documentation
in my SPSS manuals indicates how to do it when creating data from scratch
...</blockquote><br>
If you look really hard at the documentation, you'll see that it doesn't
do that. The 'nested' filetype feature lets you take a file that comes IN
nested, and write it with the data from each higher level included on
every corresponding record at the lower levels. You could do that from
your data, with (untested)<br><br>
<tt><font size=2>MATCH FILES<br>
/TABLE=Demographics<br>
/FILE =Office_Visits<br>
/BY PersonID.<br><br>
</font></tt>But it's not a great idea. The resulting file is what, in the
database world, is called un-normalized: in this case, breaking the rule
that any piece of information (like the person's demographics) should
occur in one and only one record.<br><br>
You're probably fine as you are. Happy analysis!<br><br>
-Best wishes,<br>
Richard</body>
<br>
</html>
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|