Questions tagged [spss]

SPSS is a statistics package. Originally released in 1968, it is currently owned by IBM.

SPSS (Statistical Package for the Social Sciences) is a proprietary cross-platform general-purpose statistical software package. Originally released in 1968, it is currently owned by IBM. SPSS's homepage

Versions 17 and 18 of SPSS were renamed with the acronym PASW (for Predictive Analytics SoftWare), but with version 19 it has been renamed to SPSS (see Wikipedia for a history of the name changes). One unique aspect of SPSS software compared to other popular propriety software packages (such as Stata or SAS) is the built in functionality to call Python or R commands within syntax. Otherwise it is largely comparable to other general proprietary and freeware packages (such as R), although it differs in some advanced statistical capabilities and aspects of data manipulation.

Suggested readings on using SPSS and learning the command syntax are two online PDF's.

Other useful print versions are

Other forums entirely devoted to the software are (and suggested material to search when encountering a problem with SPSS are):

Other suggested webpages are

PSPP is a free-ware, open source alternative largely mimicking the look and functionality of SPSS. You can also use SPSS with other software like R.

2084 questions
3
votes
1 answer

SPSS merge datasets with add variables only links 1 case

I have the following syntax to merge two datasets. I expect that the resulting dataset (test1) contains 5 cases with 4 of them (2 to 5) a value in variable set2. The result I am getting is dataset test1 with 5 cases but only 1 of them (case with id…
Wietze314
  • 5,942
  • 2
  • 21
  • 40
3
votes
1 answer

SPSS: How to arrange counts and percentage in horizontal order?

The usual crosstabulation table in spss looks like this: Variable 2 category A Counts Percentage Variable 1 category1 value1 per1 …
dixi
  • 680
  • 1
  • 13
  • 27
3
votes
1 answer

Possible to store a value in variable in SPSS?

Is is possible in SPSS to store a value in a variable (not a variable created in a data set)? For example I have a loop for which I want to pass the value 4 to all the locations in the loop that say NumLvl. NumLvl = 4. VECTOR A1L(NumLvl-1). LOOP #i…
RTrain3k
  • 845
  • 1
  • 13
  • 27
3
votes
1 answer

Create indicator variables in SPSS using loops

I am trying to create some indicator variables in SPSS using a loop. I want to create 17 new variables ABA(1-17) that take a value of 1 if BA(1-17) equals 1. I was trying something like: VECTOR ABA(17). LOOP #i = 1 to 17. IF(BA(#i)=1) ABA(#i) =…
RTrain3k
  • 845
  • 1
  • 13
  • 27
3
votes
1 answer

Errors with SPSS Logical Operators and Strings In a Simple Expression

I'm having some unexpected errors in achieving the following functionality. In this example code, I have the temperature on several days of the week. For this generalized example, I'm interested in determining the days that are 72,74, or 65 degrees.…
George
  • 179
  • 1
  • 11
3
votes
1 answer

Python/SPSS rename variable names

Trying to use SPSS/Python I would like change variable names for certain variables. For example, I need all variables with the oldname = t1XXX to change to newname = t01XXX Tried to play with code I found around here (like below), but could not…
3
votes
2 answers

Merge SPSS variables if they don't exist in the original file, using Python

I have an SPSS file that I am removing unwanted variables from, but want to bring in variables from elsewhere if they don't exist. So, I am looking for some Python code to go into my syntax to say - keep all the variables from a list and if any of…
PTrem1
  • 109
  • 5
3
votes
1 answer

SPSS: Recode command

What does this syntax mean? Recode variable1 variable2 (ELSE=SYSMIS) . EXECUTE . I cant seem to find any example with the recode command where only variables are stated and no values to recode. Does this mean it will just copy whatever value of…
dixi
  • 680
  • 1
  • 13
  • 27
3
votes
1 answer

SPSS Remove extension bundle

How can you remove an extension bundle from SPSS 23, after you have installed it ? Under Utilities/Extension bundles menu, you can only view installed bundles (which is read-only) and edit(which allows only for editing the details of an extension,…
horace_vr
  • 3,026
  • 6
  • 26
  • 48
3
votes
3 answers

SPSS recoding variables data from multiple variables into boolean variables

I have 26 variables and each of them contain numbers ranging from 1 to 61. I want for each case of 1, each case of 2 etc. the number 1 in a new variable. If there is no 1, the variable should contain 2. So 26 variables with data like: 1 15 28 39 46…
Larissa
  • 83
  • 5
3
votes
2 answers

How to multiply two lists of variables

I have two sets of 8 variables each. I want to multiply the first(second, third etc.) element of each list and sum up the products. So far my attempt is this: DO REPEAT set1 = var1 to var8. set2 = varA to VarH. compute sum_of_products =…
Dekay
  • 147
  • 1
  • 9
3
votes
1 answer

Aggregate in SPSS (how to copy variables)

When I aggregate in SPSS how can I add variables from the 'old file' to the new aggregated file without changing these variables? Thanks for every tip!
Nora K.
  • 33
  • 2
3
votes
0 answers

Unzip password protected archive and read the containing SPSS file into R

I have a password protected zip archive containing one SPSS system data file (*.sav). And I want to unpack it and read its content into R. From what I googled, Hmisc::getZip seems to be the best bet. And I've tried some different approaches. First…
habana
  • 317
  • 1
  • 11
3
votes
2 answers

How to get time delta in seconds between pandas datetime64 column and Oct 14 1582 (Gregorian calendar)?

I'm trying to convert pandas dataframe into SPSS format and have an issue converting a datetime64 variable. Using the following codes: import pandas as pd import datetime as dt df['date1'] = (df['date'] - pd.Timestamp('1582-10-15…
ibarant
  • 266
  • 3
  • 15
3
votes
5 answers

How to impute missing observations in subsequent rows?

I'm having difficulties with some recoding (filling in empty cells in R or SPSS) I'm working with a long format data-set (in order to run a multilevel model) where each respondent (ID-variable) has three rows, so three times the same ID number below…
Benjamin Telkamp
  • 1,451
  • 2
  • 17
  • 31