SPSS macro makes for easy splitting of data into separate files of equal numbers

SPSS Macro

SPSS macro

If you frequently need to have your data split into equal groups, this SPSS macro is the way to go!  You can just tell it how many groups you want and the variable you want to create to store group belonging and WHAM!  it randomizes the list and adds a new field showing the groups.

In the code below I show two examples of the SPSS macro.  One that will randomize the group and split it out, the second allows you to use another variable before breaking them into groups (In case you want a certain order to them.)  Both macros greatly reduce the amount of work needed to do in SPSS.


SPSS Macro for creating equal groups

Learning Macros | Raynald’s SPSS Tools

This page is a simple introduction to SPSS macros. There are several fully (line- by-line) commented examples of macro. Overview of several macro-related …

Psychological affects of the slope- Practical example on my own weight loss

Psychological affects of the slope

I’ve been on a (much needed) diet since mid January.  While my progress is going really well, I was looking at the graph I’d made and was surprised how much my attitude changed when I simply changed the ratio of one axis.  I have been working in stats for ~20 years and I’m well aware of how people purposely try and lie/mislead with graphs so I didn’t think changing the ratio would affect my mood but damn was I wrong!

In the below two graphs they both have the exact same slope & R-square however, the one the left is wider (making it seem like my weight-loss is going slower), than the one on the right.

Which graph would you rather be using to see your progress?   And, yes, I know I truncated the graph at 180.  While weight is a “scale” variable (excuse the pun) I have an ideal weight I’m aiming for.  Besides, nobody wan’ts to see me at 100 lbs.

Psychological affects of the slope

Psychological affects of the slope
This experiment reminded me of Dan Ariely’s books. This one is exceptionally well written and thought provoking.

Additive tree on restaurants built using correlation analysis with SYSTAT


Correlation Analysis

A few years back I fielded a national study on the frequency of visiting restaurant chains.  In SPSS I did correlation analysis however, as is always the case, showing a correlation matrix to the client is not an option (if I want them to understand anything.)

So I took the matrix and imported into SYSTAT then computed an Additive tree.  Additive trees examine the response patterns across variables and group them, according to their similarities, in the shape of a two-dimensional tree. The closer items appear to each other, the higher the correlation between them.  (The color coding is subjective and is just added to aide interpretation)

The Additive Tree below is much easier to evaluate as clear patterns can be seen in how consumers “see” the chains.
correlation analysis restraunt-additive tree

Here’s a great book to get ideas on conveying data visually

And here is a book utilizing SYSTAT by one of the programmers. I learned the vast majority of my statistics from this great book!