data preparation for multilevel modeling

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

data preparation for multilevel modeling

Todd Kashdan
Hi all:

I am interested in using the multilevel modeling
program in spss.  I have a Level-2 dataset which has
one row for each S to hold demographic and trait data
and a Level-1 dataset which has up to 21 rows for each
S to reflect the 21-day diary study.

Two questions:

1.  can you connect two datasets with a non-numeric
(string) variable as the key variable?

2.  how would you merge the files to be ready for
multilevel modeling in spss?  for HLM6, this two
dataset approach is exactly what is necessary but it
appears that you need a single dataset for spss.

thanks so much

cheers,
Todd

**************************
Todd B. Kashdan, Ph.D.
Assistant Professor
Department of Psychology
George Mason University
Mail Stop 3F5
Fairfax, VA  22030
http://mason.gmu.edu/~tkashdan

Confidentiality Notice: If you have reason to believe that you are not the intended recipient of this communication, please contact the sender immediately, and delete it from your system.  Any unauthorized review, use, disclosure or distribution is prohibited.



____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: data preparation for multilevel modeling

Richard Ristow
At 07:01 AM 3/4/2007, Todd Kashdan wrote:

>I am interested in using the multilevel modeling program in spss.  I
>have a Level-2 dataset which has one row for each S to hold
>demographic and trait data and a Level-1 dataset which has up to 21
>rows for each S to reflect the 21-day diary study.
>
>Two questions:
>
>1.  can you connect two datasets with a non-numeric (string) variable
>as the key variable?

Yes. It'll be named on the BY subcommand of a MATCH FILES. The key
variable must have exactly the same length in the two files.

>2.  how would you merge the files to be ready for multilevel modeling
>in spss?  for HLM6, this two dataset approach is exactly what is
>necessary but it appears that you need a single dataset for spss.

Right. SPSS always analyzes off a working file, and working files are
'flat' - the equivalent of a single table in a relational database. Use
MATCH FILES with TABLE to create the single (denormalized) working
file.

If the diary data is in file or dataset DIARY and the demographic and
trait data in file DEMOG (specifying these as path and file names if
necessary); and the numeric or string variable identifying a person is
PERSON; then (untested),

MATCH FILES
    /FILE =DIARY
    /TABLE=DEMOG
    /BY PERSON.

Both files must be in ascending order by variable PERSON. In DIARY,
which has multiple records per person, the records for one person may
be in any order.