>
>I have merged three datasets in SPSS 19 using MATCH FILES:
>DATASET ACTIVATE DataSet1.
>MATCH FILES /FILE=*
> /FILE='DataSet3'
> /RENAME (ID = d0)
> /IN source01
> /BY CreatedBy
> /DROP= d0.
>
>All three data sets consist of survey questionaires and include similar
>background questions like age, gender, nationality etc., but located in
>three different variables (column) in the merged data set.
>
>I am therefore now faced with several similar variables, located in
>different variables alocated such as this:
>
> From Dataset1: Country - located in variable#12 in the merged data set
> From Dataset2: Country - located in variable#25 in the merged data set
> From Dataset3: Country - located in variable#37 in the merged data set
>
>1) How can I possibly merge these variables into one new variable comprising
>nationality of (nominal)?
If I understand...
string country (a100).
if (var12 <>"") country =var12.
if (var25 <>"") country =var25.
if (var37 <>"") country =var37.
fre country.
* if gender and age are numeric.
string sgender sage (a100).
compute newvar =concat(rtrim(string(sgender, f10)), " ",
string(rtrim(sage, f10)), " ", rtrim(country)).
fre newvar.
>2) Most likely each CASE, in the new merged variable, will hold only one
>value. However multiple entries can occur - thus, how do I discriminate
>between nominal variable values (ie. countries)?
>
>Any advice will be highly appreciated!
>
>Thanks,
>Anders
hope it helps
Arnaldo
=====================
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