To create a new variable, (var_123), you would do:
If var_1=1, and var_2 = 1, and var_3 =1, then var_123 =1
If this approach is right, I have no way of knowing since I cannot even
put it down in SPSS.
Another friend suggested the following:Compute DIDCNFER =
CONCATINATE(StrExpr1,StrExpr2,StrExpr3)
However am not sure this will work because from this website, I learned
that this approach may not work but even then I do not know how to
write it in the compute option of SPSS.
I am receptive to any suggestions if anybody has an answer.
Thanks.
If the three variables are numeric you might do something like
numeric DIDCNFER (N9).
compute DIDCNFER = 100000*DID + 10000*CN + 1000*FER.
RECODE is a particular kind of transformation.
CONCAT is a string function.
Did someone perhaps suggest AUTORECODE so that the values of new
variables are consecutive integers?
How many values do each of DID CN and FER HAVE? Are they nominal or
string variables? what do you want to do when the 3 variables have
different values?
Please explain in more detail wHat you are trying to do.
Perhaps you should make up a mini data set with 4 variables
something like this
new file.
data list list /DID(a4) CN(a2) FER(a3) WANT (a9).
begin data
'1' '1' '1' '1'
'1' '1' 'A' '11A'
'7321' 'AB' 'XYZ' '7321ABXYZ'
. . .
or something like this
data list list /DID CN FER WANT .
begin data
1 1 1 1
1 1 2 2
1 1 3 3
1 2 1 4
1 2 2 5
1 3 3 6
. . .
3 3 3 27
end data.
Art
A...@DrKendall.org
Social Research Consultants
University Park, MD USA
(301) 864-5570
For example:
MATCH FILES FILE=*
/FILE='c:\somefile.sav'
/BY DID CN FER.
EXE.
I may be way off with respect to your reason for wanting to combine
these variables, but...