Stacked (pyramid) bar charts for Likert Data
A while ago this question on Cross Validated showed off some R libraries to plot Likert data. Here is a quick post on replicating the stacked pyramid chart in SPSS. This is one of the (few) examples...
View ArticleEqual Probability Histograms in SPSS
The other day on NABBLE an individual asked for displaying histograms with unequal bar widths. I showed there if you have the fences (and the height of the bar) you can draw the polygons in inline GPL...
View ArticleNetwork Xmas Tree in SPSS
Motivated by Rick Wicklin’s raster based Christmas Tree in SAS, here I will show how to lay out a network Xmas tree in SPSS – XKCD network style. SPSS’s GPL language has the ability to lay out...
View ArticleQuick SPSS tip: Suppressing output
When running commands in SPSS, it routes summaries and output of particular functions to the active Output document. This is very nice for statistical reporting of various tables, like crosstabs or...
View ArticleNegative Binomial regression and predicted probabilities in SPSS
For my dissertation I have been estimating negative binomial regression models predicting the counts of crimes at small places (i.e. street segments and intersections). When evaluating the fit of...
View ArticleWorking with American Community Survey Data in SPSS
Going through the documentation and downloading data from the Census is quite a chore. Here I am going to give some example SPSS functions I have created for working with the plain text 5 year summary...
View ArticleVisualizing multi-level data using ellipses
After reading Elliptical Insights: Understanding Statistical Methods through Elliptical Geometry (Friendly, Monette & Fox 2013) I was interested in trying ellipses out for viz. multi-level data....
View ArticleUsing Python to geocode data in SPSS
This is the first time since I’ve been using SPSS that I have regular access to Python and R programmability in all of the different places I use SPSS (home and multiple work computers). So I’ve been...
View ArticleThe mad scientist workflow: Some examples of using python and R within SPSS
I figured I would share some of the scripts I have been recently working on to produce a set of figures on a regular basis for reports. SPSS GGRAPH can not be directly parameterized within macro’s (at...
View ArticleUsing SPSS’s SIMPLAN to generate fake data
A while ago I had a post about generating fake data in SPSS. This is useful for conducting your own simulations, or as I mentioned in the prior post it is often useful when posting questions to...
View ArticlePlotting interactions and non-linear predictions
When interpreting regression model coefficients in which the predictions are non-linear in the original variables, such as when you have polynomial terms or interaction effects, it is much simpler to...
View ArticleFinding subgroups in a graph using NetworkX and SPSS
This is a task I’ve have to conduct under several guises in the past. Given a set of edges, reduce those edges into unique subgroups based on the transitive closure of those edges. That is, find a...
View ArticleUsing the Google Places API in Python
So I was interested in scraping data from the Google Places API recently. My motivation came from some criminology studies that examine the relationship between coffee shops and crime (Papachristos et...
View ArticleJittered scatterplots with 0-1 data
Scatterplots with discrete variables and many observations take some touches beyond the defaults to make them useful. Consider the case of a categorical outcome that can only take two values, 0 and 1....
View ArticleSmoothed regression plots for multi-level data
Bruce Weaver on the SPSS Nabble site pointed out that the Centre for Multilevel Modelling has added some syntax files for multilevel modelling for SPSS. I went through the tutorials (in R and Stata) a...
View ArticleAggregating values in time series charts
One common task I undertake in is to make time series graphs of crime counts, often over months or shorter time periods. Here is some example data to illustrate, a set of 20 crimes with a particular...
View ArticleEstimating group based trajectory models using SPSS and R
For a project I have been estimating group based trajectory models for counts of crime at micro places. Synonymous with the trajectory models David Weisburd and colleagues estimated for street segments...
View ArticleUsing regular expressions in SPSS
SPSS has a native set of string manipulations that will suffice for many simple situations. But with the ability to call Python routines, one can use regular expressions (or regex is often used for...
View ArticleLog Scaled Charts in SPSS
Log scales are convenient for a variety of data. Here I am going to post a brief tutorial about making and formatting log scales in SPSS charts. So first lets start with a simple set of data: DATA...
View ArticleTurning data from Python into SPSS data
I’ve shown how you can grab data from SPSS and use it in Python commands, and I figured a post about the opposite process (taking data in Python and turning it into an SPSS data file) would be useful....
View Article