0
$\begingroup$

I have an SPSS data set with 700+ respondents and 13 products that they could own.

Each product has its own variable Product01 = 1 means they own product 1 Product02 = 0 means they dont own product 2 etc etc

*Edit for clarity: For example, this would mean counting:

How many respondents have product 1, 2, 3 and none of the other 10.

How many respondents have product 5 and 8 and none of the other 11.

etc.

Does anyone have an spss syntax that could determine the frequency of the possible combinations found from the data?

Similar to this: Computing combinations and this: http://pages.infinit.net/rlevesqu/Syntax/Combinations/FindAllCombinationsOf1upToNitemsOutOfMitems.txt

$\endgroup$
2
  • $\begingroup$ So, you have N respondents x P variables binary (1 vs 0) data, and seek a SPSS solution to compute frequences of "all=1" for all possible combinations - by 2,3,...,P - of variables? Is that right? $\endgroup$
    – ttnphns
    Commented Nov 25, 2013 at 11:00
  • $\begingroup$ Yup... that will be right. I added my comment to Ruben's comment below. $\endgroup$
    – Michael
    Commented Nov 26, 2013 at 2:03

2 Answers 2

1
$\begingroup$

Use AGGREGATE with all 13 products as BREAK variables.

You can save the frequency of each combination ("N" or "NU") as a new variable (see the AGGREGATE link for an example).

$\endgroup$
2
  • 1
    $\begingroup$ with all 13 products as break This is right advice only if the OP meant: combination V1 V2 V3 is "these 3 all=1 and the rest 10 variables all=0". If he meant only "these 3 all=1", your advice won't give the wanted result unless a postprocessing on it is done. (As for me, it is so far unclear what Michael wants.) $\endgroup$
    – ttnphns
    Commented Nov 25, 2013 at 14:17
  • $\begingroup$ Hi all, thanks for the great replies so far....Sorry for the confusion... It is the first case that Ruben mentions....V1V2V3 will be when all three =1 and rest of the 10 = 0. $\endgroup$
    – Michael
    Commented Nov 26, 2013 at 2:01
1
$\begingroup$

If you concatenate all thirteen variables as 1-byte strings (or do the equivalent numerically with powers of 2), you can just run FREQUENCIES on this composite variable and sort the table in descending order.

Recent versions of Statistics allow you to sort a table in the Viewer. For older versions or to create the table as a dataset, use OMS. Here is an example, assuming that the variables have already been concatenated into a string variable v.

dataset name data.

dataset declare freqs.

oms select tables /if subtypes="frequencies"/destination outfile = freqs format=sav.

freq v.

omsend.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.