Search

1 to 10 of 19
Sort by

Blog Entry
Passing arguments to SPSSINC TRANS

So I actually bothered to read the help the other day for SPSSINC TRANS , which being generic allows you to use Python functions similar to how COMPUTE statements work, just a bit more general. Two examples of passing arguments I did not know you could do were 1) pass a list as an argument,...

Archive User's profile image

Blog Entry
String substitution in Python

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...

Archive User's profile image

Blog Entry
Extracting items from SPSS tables using 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). The typical way to do this is to grab the table using OMS...

Archive User's profile image

Blog Entry
Some examples of using DO REPEAT in SPSS

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. In its simplest form, DO REPEAT simply iterates over a list of variables and can...

Archive User's profile image

Blog Entry
Repeating Charts in SPSS for unique IDs

The title is probably not that clear, but I've seen this request a few times and have used this trick in one my projects, so figured it would be a worthwhile topic to illustrate. So the problem is you have a background distribution, and you want to tailor a set of individual charts showing the...

Archive User's profile image

Blog Entry
Turning 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. A few different motivating examples are: Creating a set of permutations using the ...

Archive User's profile image

Blog Entry
Using 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 short) to accomplish more complicated searches. A post on Nabble recently discussed extracting...

Archive User's profile image

Blog Entry
Estimating 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 in Seattle. Here I will show how using SPSS and the R package crimCV one can estimate...

Archive User's profile image

Blog Entry
Aggregating 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 date in 2013. *Make some fake data. SET SEED 10. INPUT PROGRAM. LOOP #i = 1 TO 20. COMPUTE #R...

Archive User's profile image

Blog Entry
Using 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 exploring more solutions to use these tools in regular data analysis and work-flows - of course...

Archive User's profile image