Examples of how you can use the “TO” argument in both passing variables lists within the python formula and assigning variables to the results. Continue reading Passing arguments to SPSSINC TRANS

I recently had a set of SPSS syntax that iterated over multiple variables and generated many similar graphs. They were time series graphs of multiple variables, so the time stayed the same but the variable on the Y axis changed and the code also changed the titles of the graphs. Initially I was using the... Continue reading String substitution in Python

Sometimes there are calculations provided for in SPSS tables that are necessary to use for other calculations. A frequent one is to grab certain percentiles from a FREQUENCY table (Equal Probability Histograms in SPSS is one example). Continue reading Extracting items from SPSS tables using Python

For the majority of data management I do in SPSS, the brunt of the work is likely done in under 10 different commands. DO REPEAT is one of those commands, and I figured I would show some examples of its use. Continue reading Some examples of using DO REPEAT in SPSS

So the problem is you have a background distribution, and you want to tailor a set of individual charts showing the unique individuals score against the background distribution.
Continue reading Repeating Charts in SPSS for unique IDs

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. Continue reading Turning data from Python into SPSS data

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 short) to accomplish more complicated searches. Continue reading Using regular expressions in SPSS

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 in Seattle. Here I will show how using SPSS and the R package crimCV one can estimate similar group based trajectory models. Continue reading Estimating group based trajectory models using SPSS and R

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 date in 2013.
Continue reading Aggregating values in time series charts

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 exploring more solutions to use these tools in regular data analysis and work-flows - of course to accomplish... Continue reading Using Python to geocode data in SPSS