SCALE: cat(dim(1), sort.statistic(an(MeanQ)), reverse())ĮLEMENT: polygon(position(Question*Case), color. GUIDE: text.title(label("Order By Mean Number per Case and Question")) GRAPHDATASET NAME="graphdataset" VARIABLES=Question Case Bin MeanQĭATA: MeanQ=col(source(s), name("MeanQ")) *Sorting by number answered yes per person and then by yes per question.ĪGGREGATE OUTFILE = * MODE = ADDVARIABLES It produces a somewhat more orderly chart - but my three groups are still not obviously visible. The one I show below is to simply sort the scores the cases and the questions by the mean number of "Yes" answers. Now often the plot is much more informative by some simple ordering (as is referenced in the CV post). SCALE: cat(aesthetic(), map(("0",color.white),("1",color.darkgrey)))ĮLEMENT: polygon(position(Question*Case), color.interior(Bin)) GUIDE: text.title(label("Default Ordering")) GRAPHDATASET NAME="graphdataset" VARIABLES=Question Case BinĭATA: Question=col(source(s), name("Question"), unit.category())ĭATA: Case=col(source(s), name("Case"), unit.category())ĭATA: Bin=col(source(s), name("Bin"), unit.category()) Now that our data is in long format we can make our binary heat map. *Reshaping and then plotting in a matrix.
Now to make our plot we are going to reshape the data from wide to long using VARSTOCASES. MATCH FILES FILE = * /DROP Group QP1 TO QP16. *************************************.ĭO IF $casenum = 1 OR (Group LAG(Group)).ĭO REPEAT Bin = Bin1 TO Bin16 /QP = QP1 TO QP16. INTRODUCTION TO SPSS Figure 0.1: Dialog box for opening a data le or entering data. So here is a bit of a lengthy code to create a set of binary responses for 75 people, and they are drawn from 3 distinct groups.
#SPSS 22 GUIDE HOW TO#
I will answer how to replicate that particular plot you mention in SPSS - but of course there are other types of analysis you could proceed to conduct.