Overview All SPSS Commands

The table below lists all SPSS commands and the additional licenses -if any- you need for using them.

This overview is based on SPSS version 22 but we hope to soon update it for version 24.

Consult the notes section for some tips on using the table or downloading it as an SPSS (.sav) data file.

Overview

NAME TYPE OPTION INTRODUCED NOTES
2SLS Procedure Regression SPSS version 14
ACF Procedure Statistics Base SPSS version 12 or lower
ADD DOCUMENT Other Statistics Base SPSS version 12 or lower Obsolete. Use DOCUMENT instead.
ADD FILES Transformation Statistics Base SPSS version 12 or lower
ADD VALUE LABELS Other Statistics Base SPSS version 12 or lower Add or edit value labels.
ADP Procedure Data Preparation SPSS version 18
AGGREGATE Procedure Statistics Base SPSS version 12 or lower Create dataset with summary statistics over cases.
AIM Procedure Statistics Base SPSS version 14
ALSCAL Procedure Statistics Base SPSS version 12 or lower
ALTER TYPE Procedure Statistics Base SPSS version 16 Convert string variables to numeric variables to or reversely.
ANACOR Procedure Categories SPSS version 12 or lower
ANOVA Procedure Statistics Base SPSS version 12 or lower
APPLY DICTIONARY Other Statistics Base SPSS version 12 or lower Copy dictionary properties between files or variables.
AREG Procedure Statistics Base SPSS version 12 or lower
ARIMA Procedure Statistics Base SPSS version 12 or lower
AUTORECODE Procedure Statistics Base SPSS version 12 or lower Convert string variable into numeric variable with value labels.
BEGIN DATA-END DATA Other Statistics Base SPSS version 12 or lower
BEGIN GPL-END GPL Other Statistics Base SPSS version 14
BEGIN PROGRAM-END PROGRAM Other Statistics Base SPSS version 14 Indicates start of Python or R program block.
BOOTSTRAP Transformation Bootstrapping SPSS version 18
BREAK Transformation Statistics Base SPSS version 12 or lower
CACHE Transformation Statistics Base SPSS version 12 or lower
CASEPLOT Procedure Statistics Base SPSS version 12 or lower
CASESTOVARS Procedure Statistics Base SPSS version 12 or lower Restructure data: convert cases to variables.
CATPCA Procedure Categories SPSS version 12 or lower
CATREG Procedure Categories SPSS version 12 or lower
CCF Procedure Statistics Base SPSS version 12 or lower
CD Other Statistics Base SPSS version 13 Set default directory. Affects all commands (including GET, SAVE, INSERT and SET CTEMPLATE) except SET TLOOK.
CLEAR TIME PROGRAM Other Statistics Base SPSS version 16
CLEAR TRANSFORMATIONS Other Statistics Base SPSS version 12 or lower
CLUSTER Procedure Statistics Base SPSS version 12 or lower Hierarchical cluster analysis, often used in market segmentation.
CODEBOOK Other Statistics Base SPSS version 17 Similar to DISPLAY DICTIONARY.
COMMENT Other Statistics Base SPSS version 12 or lower Obsolete. Use an asterisk (*) for comments in syntax.
COMPARE DATASETS Procedure Statistics Base SPSS version 21
COMPUTE Transformation Statistics Base SPSS version 12 or lower
CONJOINT Procedure Conjoint SPSS version 12 or lower
CORRELATIONS Procedure Statistics Base SPSS version 12 or lower Only Pearson correlations. Use NONPAR CORR for Spearman/Kendall correlations.
CORRESPONDENCE Procedure Categories SPSS version 12 or lower
COUNT Transformation Statistics Base SPSS version 12 or lower For counting missing values over variables, use NMISS.
COXREG Procedure Advanced Statistics SPSS version 12 or lower
CREATE Procedure Statistics Base SPSS version 12 or lower Creates lag/lead series, cumulative sums and more.
CROSSTABS Procedure Statistics Base SPSS version 12 or lower
CSCOXREG Procedure Complex Samples SPSS version 16
CSDESCRIPTIVES Procedure Complex Samples SPSS version 12 or lower
CSGLM Procedure Complex Samples SPSS version 13
CSLOGISTIC Procedure Complex Samples SPSS version 13
CSORDINAL Procedure Complex Samples SPSS version 15
CSPLAN Other Complex Samples SPSS version 12 or lower
CSSELECT Procedure Complex Samples SPSS version 12 or lower
CSTABULATE Procedure Complex Samples SPSS version 12 or lower
CTABLES Procedure Custom Tables SPSS version 12 or lower
CURVEFIT Procedure Statistics Base SPSS version 12 or lower
DATA LIST Transformation Statistics Base SPSS version 12 or lower
DATAFILE ATTRIBUTE Other Statistics Base SPSS version 14
DATASET ACTIVATE Other Statistics Base SPSS version 14 Choose which dataset is addressed by subsequent commands.
DATASET CLOSE Other Statistics Base SPSS version 14 Close dataset (without saving).
DATASET COPY Procedure Statistics Base SPSS version 14
DATASET DECLARE Other Statistics Base SPSS version 14
DATASET DISPLAY Other Statistics Base SPSS version 14
DATASET NAME Other Statistics Base SPSS version 14 Assign name to dataset by which it can be addressed. Allows working on multiple datasets simultaneously.
DATE Procedure Statistics Base SPSS version 12 or lower
DEFINE-!ENDDEFINE Other Statistics Base SPSS version 12 or lower Define macro. Mostly deprecated since Python was introduced in SPSS version 14.
DELETE VARIABLES Other Statistics Base SPSS version 12 or lower Permanently delete one or more variables.
DESCRIPTIVES Procedure Statistics Base SPSS version 12 or lower Descriptive statistics over all cases. Also fastest way to create z-scores.
DETECTANOMALY Procedure Data Preparation SPSS version 14
DISCRIMINANT Procedure Statistics Base SPSS version 12 or lower
DISPLAY Other Statistics Base SPSS version 12 or lower Display parts of dictionary. Use SHOW for displaying settings.
DMCLUSTER Procedure Direct Marketing SPSS version 18
DMLOGISTIC Procedure Direct Marketing SPSS version 18
DMROC Procedure Direct Marketing SPSS version 18
DMTABLES Procedure Direct Marketing SPSS version 18
DMTREE Procedure Direct Marketing SPSS version 18
DO IF Transformation Statistics Base SPSS version 12 or lower Only acts upon transformations.
DO REPEAT Transformation Statistics Base SPSS version 12 or lower Only acts upon transformations.
DOCUMENT Other Statistics Base SPSS version 12 or lower A DOCUMENT is a data file description that is saved as part of the dictionary.
DROP DOCUMENTS Other Statistics Base SPSS version 12 or lower See DOCUMENT.
ECHO Other Statistics Base SPSS version 12 or lower
END CASE Other Statistics Base SPSS version 12 or lower Often used with INPUT PROGRAM and LOOP.
END FILE Other Statistics Base SPSS version 12 or lower Often used with INPUT PROGRAM and LOOP.
ERASE Other Statistics Base SPSS version 12 or lower Delete one or more external files. Use carefully.
EXAMINE Procedure Statistics Base SPSS version 12 or lower
EXECUTE Procedure Statistics Base SPSS version 12 or lower Does nothing except run pending transformations.
EXPORT Procedure Statistics Base SPSS version 12 or lower
EXSMOOTH Other Statistics Base SPSS version 12 or lower
EXTENSION Other Statistics Base SPSS version 16
FACTOR Procedure Statistics Base SPSS version 12 or lower Exploratory factor analysis (including PCA).
FILE HANDLE Other Statistics Base SPSS version 12 or lower
FILE LABEL Other Statistics Base SPSS version 12 or lower
FILE TYPE-END FILE TYPE Other Statistics Base SPSS version 12 or lower
FILTER Other Statistics Base SPSS version 12 or lower Exclude selection of cases from procedures.
FINISH Other Statistics Base SPSS version 12 or lower
FIT Procedure Statistics Base SPSS version 12 or lower
FLIP Procedure Statistics Base SPSS version 12 or lower Transposes the active dataset.
FORMATS Other Statistics Base SPSS version 12 or lower Set formats for (mostly) numeric variables..
FREQUENCIES Procedure Statistics Base SPSS version 12 or lower Fastest option for running histograms and bar charts.
GENLIN Procedure Advanced Statistics SPSS version 15
GENLINMIXED Procedure Advanced Statistics SPSS version 19 command syntax reference classifies command as “Advanced Models” instead of “Advanced Statistics”.
GENLOG Procedure Advanced Statistics SPSS version 12 or lower
GET Other Statistics Base SPSS version 12 or lower Open SPSS data file.
GET CAPTURE Other Statistics Base SPSS version 12 or lower Deprecated. Use GET DATA instead.
GET DATA Other Statistics Base SPSS version 12 or lower Open non SPSS data file (including Excel).
GET SAS Other Statistics Base SPSS version 12 or lower
GET STATA Other Statistics Base SPSS version 14
GET TRANSLATE Other Statistics Base SPSS version 12 or lower
GETCOGNOS Procedure Statistics Base SPSS version 21
GGRAPH Procedure Statistics Base SPSS version 14
GLM Procedure Advanced Statistics SPSS version 12 or lower General Linear Model.
GLM: Multivariate Procedure Advanced Statistics SPSS version 12 or lower
GLM: Repeated Measures Procedure Advanced Statistics SPSS version 12 or lower Used for repeated measures ANOVA.
GLM: Univariate Procedure Advanced Statistics SPSS version 12 or lower
GRAPH Procedure Statistics Base SPSS version 12 or lower
HILOGLINEAR Procedure Advanced Statistics SPSS version 12 or lower
HOMALS Procedure Categories SPSS version 12 or lower
HOST Other Statistics Base SPSS version 13
IF Transformation Statistics Base SPSS version 12 or lower Conditional COMPUTE command.
IGRAPH Procedure Statistics Base Don’t use Deprecated since version 18. Will be removed from SPSS.
IMPORT Other Statistics Base SPSS version 12 or lower
INCLUDE Other Statistics Base SPSS version 12 or lower Run external syntax file. Deprecated as predecessor of INSERT.
INFO Other Statistics Base Don’t use Obsolete and no longer supported
INPUT PROGRAM Transformation Statistics Base SPSS version 12 or lower Simulate large/complex data. Often used with LOOP.
INSERT Other Statistics Base SPSS version 13 Run external syntax file. Successor of (now deprecated INCLUDE).
KEYED DATA LIST Other Statistics Base SPSS version 12 or lower
KM Procedure Advanced Statistics SPSS version 12 or lower
KNN Procedure Statistics Base SPSS version 17
LEAVE Transformation Statistics Base SPSS version 12 or lower
LINEAR Procedure Statistics Base SPSS version 19
LIST Procedure Statistics Base SPSS version 12 or lower
LOGISTIC REGRESSION Procedure Regression SPSS version 12 or lower
LOGLINEAR Procedure Advanced Statistics SPSS version 12 or lower Only available in syntax.
LOOP Transformation Statistics Base SPSS version 12 or lower Acts only on transformations.
MANOVA Procedure Advanced Statistics SPSS version 12 or lower Only available in syntax.
MANOVA: Multivariate Procedure Advanced Statistics SPSS version 12 or lower
MANOVA: Repeated Measures Procedure Advanced Statistics SPSS version 12 or lower
MANOVA: Univariate Procedure Advanced Statistics SPSS version 12 or lower
MAPS Procedure Statistics Base Don’t use Removed from SPSS and command syntax reference
MATCH FILES Transformation Statistics Base SPSS version 12 or lower Merge files with similar cases, different variables.
MATRIX DATA Other Statistics Base SPSS version 12 or lower
MATRIX-END MATRIX Other Statistics Base SPSS version 12 or lower
MCONVERT Other Statistics Base SPSS version 12 or lower
MEANS Procedure Statistics Base SPSS version 12 or lower
MISSING VALUES Other Statistics Base SPSS version 12 or lower Specify missing values for one or many variables.
MIXED Procedure Advanced Statistics SPSS version 12 or lower
MLP Procedure Neural Networks SPSS version 16
MODEL CLOSE Other Statistics Base SPSS version 13
MODEL HANDLE Other Statistics Base SPSS version 13
MODEL LIST Other Statistics Base SPSS version 13
MODEL NAME Other Statistics Base SPSS version 12 or lower
MRSETS Other Statistics Base SPSS version 12 or lower
MULT RESPONSE Procedure Statistics Base SPSS version 12 or lower
MULTIPLE CORRESPONDENCE Procedure Categories SPSS version 13
MULTIPLE IMPUTATION Procedure Missing Values SPSS version 17
MVA Procedure Missing Values SPSS version 12 or lower
N OF CASES Transformation Statistics Base SPSS version 12 or lower Obsolete. Use SELECT IF with $casenum instead.
NAIVEBAYES Procedure IBM SPSS Statistics Server SPSS version 14 Couldn’t find this option on IBM website.
NEW FILE Other Statistics Base SPSS version 12 or lower
NLR Procedure Regression SPSS version 12 or lower
NOMREG Procedure Regression SPSS version 12 or lower
NONPAR CORR Procedure Statistics Base SPSS version 12 or lower Spearman and Kendall correlations.
NPAR TESTS Procedure Statistics Base SPSS version 12 or lower Non parametric significance tests.
NPTESTS Procedure Statistics Base SPSS version 18 Non parametric significance tests.
NUMERIC Other Statistics Base SPSS version 12 or lower Numeric counterpart of STRING. Rarely (if ever) needed.
OLAP CUBES Procedure Statistics Base SPSS version 12 or lower
OMS Other Statistics Base SPSS version 12 or lower Start monitoring, capturing or suppressing selected output.
OMSEND Other Statistics Base SPSS version 12 or lower Stop monitoring/capturing/suppressing selected output and show/save captured output if any.
OMSINFO Other Statistics Base SPSS version 12 or lower
OMSLOG Other Statistics Base SPSS version 12 or lower
ONEWAY Procedure Statistics Base SPSS version 12 or lower One-way ANOVA.
OPTIMAL BINNING Procedure Data Preparation SPSS version 15
ORTHOPLAN Other Conjoint SPSS version 12 or lower
OUTPUT ACTIVATE Other Statistics Base SPSS version 15 Choose output window to which subsequent output should be appended.
OUTPUT CLOSE Other Statistics Base SPSS version 15 Close output window (without saving).
OUTPUT DISPLAY Other Statistics Base SPSS version 15
OUTPUT EXPORT Other Statistics Base SPSS version 17
OUTPUT MODIFY Other Statistics Base SPSS version 22 Modifies output items such as tables.
OUTPUT NAME Other Statistics Base SPSS version 15 Assign name to output window by which it can be addressed. Allows using multiple output windows simultaneously.
OUTPUT NEW Other Statistics Base SPSS version 15
OUTPUT OPEN Other Statistics Base SPSS version 15
OUTPUT SAVE Other Statistics Base SPSS version 15
OVERALS Procedure Categories SPSS version 12 or lower
PACF Procedure Statistics Base SPSS version 12 or lower
PARTIAL CORR Procedure Statistics Base SPSS version 12 or lower
PERMISSIONS Other Statistics Base SPSS version 12 or lower Set file permissions (read-only).
PLANCARDS Procedure Conjoint SPSS version 12 or lower
PLS Procedure PLS Extension Command (free) SPSS version 16 Requires SPSS Python Essentials
PLUM Procedure Statistics Base SPSS version 12 or lower
POINT Other Statistics Base SPSS version 12 or lower
PPLOT Procedure Statistics Base SPSS version 12 or lower
PREDICT Transformation Statistics Base SPSS version 12 or lower
PREFSCAL Procedure Categories SPSS version 14
PRESERVE Other Statistics Base SPSS version 12 or lower Remember current settings. Enables to RESTORE them later.
PRINCALS Procedure Categories SPSS version 12 or lower
PRINT Transformation Statistics Base SPSS version 12 or lower
PRINT EJECT Transformation Statistics Base SPSS version 12 or lower
PRINT FORMATS Other Statistics Base SPSS version 12 or lower
PRINT SPACE Transformation Statistics Base SPSS version 12 or lower
PROBIT Procedure Regression SPSS version 12 or lower
PROCEDURE OUTPUT Other Statistics Base SPSS version 12 or lower
PROXIMITIES Procedure Statistics Base SPSS version 12 or lower
PROXSCAL Procedure Statistics Base SPSS version 12 or lower
QUICK CLUSTER Procedure Statistics Base SPSS version 12 or lower K-Means Cluster Analysis, often used for market segmentation.
RANK Procedure Statistics Base SPSS version 12 or lower
RATIO STATISTICS Procedure Statistics Base SPSS version 12 or lower
RBF Procedure Neural Networks SPSS version 16
READ MODEL Other Statistics Base SPSS version 12 or lower
RECODE Transformation Statistics Base SPSS version 12 or lower
RECORD TYPE Other Statistics Base SPSS version 12 or lower
REFORMAT Other Statistics Base Don’t use Command no longer supported.
REGRESSION Procedure Statistics Base SPSS version 12 or lower
RELIABILITY Procedure Statistics Base SPSS version 12 or lower
RENAME VARIABLES Other Statistics Base SPSS version 12 or lower Change variable names.
REPEATING DATA Other Statistics Base SPSS version 12 or lower
REPORT Procedure Statistics Base SPSS version 12 or lower
REPOSITORY ATTRIBUTES Other Statistics Base SPSS version 16 Command name used to be PER ATTRIBUTES until SPSS version 18.
REPOSITORY CONNECT Other Statistics Base SPSS version 15 Command name used to be PER CONNECT until SPSS version 18.
REPOSITORY COPY Other Statistics Base SPSS version 16 Command name used to be PER COPY until SPSS version 18.
REREAD Other Statistics Base SPSS version 12 or lower
RESPONSE RATE Procedure Direct Marketing SPSS version 18
RESTORE Other Statistics Base SPSS version 12 or lower Used with PRESERVE.
RMV Procedure Statistics Base SPSS version 12 or lower
ROC Procedure Statistics Base SPSS version 12 or lower
SAMPLE Transformation Statistics Base SPSS version 12 or lower
SAVE Procedure Statistics Base SPSS version 12 or lower Save data as SPSS data (.sav) file.
SAVE DATA COLLECTION Procedure Statistics Base SPSS version 15 Command name used to be SAVE DIMENSIONS until SPSS version 18. Only available on Windows OS.
SAVE MODEL Other Statistics Base SPSS version 12 or lower
SAVE TRANSLATE Procedure Statistics Base SPSS version 12 or lower Save data as non SPSS file (including Excel).
SCRIPT Other Statistics Base SPSS version 12 or lower Deprecated since Python was introduced in SPSS version 14.
SEASON Procedure Forecasting SPSS version 12 or lower
SELECT IF Transformation Statistics Base SPSS version 12 or lower Can be used with LOOP, DO REPEAT, TEMPORARYand DO IF.
SELECTPRED Procedure Statistics Server SPSS version 14
SET Other Statistics Base SPSS version 12 or lower Edit one or more settings except CD. Use SHOW for displaying settings.
SHIFT VALUES Procedure Statistics Base SPSS version 17
SHOW Other Statistics Base SPSS version 12 or lower Show one or more settings. Use SET for editing settings. Use DISPLAY for showing dictionary information.
SIMPLAN Procedure Statistics Base SPSS version 21
SIMPREP BEGIN-SIMPREP END Procedure Statistics Base SPSS version 21
SIMRUN Other Statistics Base SPSS version 21
SORT CASES Procedure Statistics Base SPSS version 12 or lower
SORT VARIABLES Procedure Statistics Base SPSS version 16 Does not read data if no transformations are pending
SPCHART Procedure Statistics Base SPSS version 12 or lower
SPECTRA Procedure Forecasting SPSS version 12 or lower
SPLIT FILE Other Statistics Base SPSS version 12 or lower Have procedures process groups of cases separately.
STAR JOIN Procedure Statistics Base SPSS version 21
STRING Other Statistics Base SPSS version 12 or lower Create new string variable before setting its values with COMPUTEIF or other command.
SUBTITLE Other Statistics Base SPSS version 12 or lower
SUMMARIZE Procedure Statistics Base SPSS version 12 or lower
SURVIVAL Procedure Advanced Statistics SPSS version 12 or lower
SYSFILE INFO Other Statistics Base SPSS version 12 or lower Display dictionary information from external SPSS data file.
T-TEST Procedure Statistics Base SPSS version 12 or lower
TABLES Procedure Statistics Base SPSS version 12 or lower Not mentioned in command syntax reference. Some help available via F1 shortkey.
TDISPLAY Other Statistics Base SPSS version 12 or lower
TEMPORARY Transformation Statistics Base SPSS version 12 or lower
TIME PROGRAM Transformation Statistics Base SPSS version 14
TITLE Other Statistics Base SPSS version 12 or lower
TMS BEGIN Other Statistics Base SPSS version 15
TMS END Other Statistics Base SPSS version 15
TMS IMPORT Other Statistics Base SPSS version 18
TMS MERGE Other Statistics Base SPSS version 15
TREE Procedure Decision Trees SPSS version 13
TSAPPLY Procedure Forecasting SPSS version 14
TSET Other Statistics Base SPSS version 12 or lower
TSHOW Other Statistics Base SPSS version 12 or lower
TSMODEL Procedure Forecasting SPSS version 14
TSPLOT Procedure Statistics Base SPSS version 12 or lower
TWOSTEP CLUSTER Procedure Statistics Base SPSS version 12 or lower
UNIANOVA Procedure Statistics Base SPSS version 12 or lower Use GLM for repeated measures ANOVA.
UPDATE Transformation Statistics Base SPSS version 12 or lower
USE Other Statistics Base SPSS version 12 or lower
VALIDATEDATA Procedure Data Preparation SPSS version 14
VALUE LABELS Other Statistics Base SPSS version 12 or lower Erase all value labels from one or more variables and/or specify new ones. For editing value labels, ADD VALUE LABELS is usually a better option.
VARCOMP Procedure Advanced Statistics SPSS version 12 or lower
VARIABLE ALIGNMENT Other Statistics Base SPSS version 12 or lower
VARIABLE ATTRIBUTE Other Statistics Base SPSS version 14
VARIABLE LABELS Other Statistics Base SPSS version 12 or lower Add or edit description of variables.
VARIABLE LEVEL Other Statistics Base SPSS version 12 or lower Sets measurement levels for variables.
VARIABLE ROLE Other Statistics Base SPSS version 18
VARIABLE WIDTH Other Statistics Base SPSS version 12 or lower Set display width (columns in variable view) for variable(s).
VARSTOCASES Procedure Statistics Base SPSS version 12 or lower Restructure data: convert variables to cases.
VECTOR Other Statistics Base SPSS version 12 or lower Allow variables to be addressed by index. Mainly used with LOOP.
VERIFY Procedure Statistics Base SPSS version 12 or lower
WEIGHT Other Statistics Base SPSS version 12 or lower Assign weights to cases.
WLS Procedure Regression SPSS version 12 or lower
WRITE Transformation Statistics Base SPSS version 12 or lower File is written after running subsequent procedure, possibly EXECUTE.
WRITE FORMATS Other Statistics Base SPSS version 12 or lower
XGRAPH Procedure Statistics base SPSS version 13
XSAVE Transformation Statistics base SPSS version 12 or lower Can be used with DO IF and LOOP.

Notes

For this table as an SPSS data (.sav) file, download overview_all_spss_commands.sav. For checking which commands you can and cannot use, first run

show license.

The result of doing so on our computer is shown in the screenshot below.

SPSS SHOW LICENSE

The table tells us we’ve SPSS version 22 installed with four modules. In SPSS, these are usually referred to as “options” but they somehow appear under “Component” in this table. If we look at the value labels of these options in variable view, we see that they’ve been coded as 1, 2, 6 and 14. This is shown by the screenshot below.

SPSS Overview Commands

This means that we can use any command that belongs to option 1, 2, 6 or 14 and was introduced in SPSS version 22 or earlier. We can easily delete all other commands by using SELECT IF with ANY as shown in the syntax below.

Delete Unavailable Commands from Overview

*1. Delete all commands that were introduced after version 22 or don’t belong to options 1, 2, 6 or 14.

select if (any(option,1,2,6,14) and introduced <= 22).*2. Run transformation and inspect result.

frequencies option.

Post Author: Zahid Farid