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
4
votes
4 answers

Converting .sav file to pandas dataframe

I'm in the process of writing a data checker to review spss files and need to programmatically handle different checks. The first step is to access an spss file, convert it to a pandas dataframe and run my checks from there. The only way I've found…
grigs
  • 1,140
  • 3
  • 15
  • 28
4
votes
2 answers

Using 64-Bit SPSS Libraries in C#

I'm trying to create an .sav file programmatically without having to use SPSS automation (the SPSS.BackendAPI library) in order to free up more SPSS licenses. I found this library at CodePlex that uses the 32-bit I/O module without requiring a…
Philip Hanson
  • 1,847
  • 2
  • 15
  • 24
4
votes
2 answers

How to Instantiate a 64-bit Class from 32-bit Excel Process

I have registered several DLLs specific to Unicom Dimensions / IBM SPSS Data Collection Desktop 7 (x64) software and verify the Classes are showing up under HKCR/Classes as well as HKLM. Dumpbin.exe indicates the following dependencies, , I don't…
David Zemens
  • 53,033
  • 11
  • 81
  • 130
4
votes
1 answer

Difference between R and SPSS linear model results

I'm a beginner at statistics. Currently attending an introductory course, which uses spss. I've been trying to learn r at the same time, and so far I've consistently been getting the same results, for calculations with both tools, As…
krissen
  • 63
  • 10
4
votes
1 answer

How to test if a variable exists

I need to run SPSS syntax in an IF statement, which tests if a variable exists in the document. I am having trouble getting the IF test right. I'm trying to do this: do if (test if myVariable exists). // execute code here end if. Execute. I've…
Adam
  • 99
  • 7
4
votes
2 answers

Concatenation of user products based in conditions

I'm trying to concatenate string variables based in some conditions. Suppose the following data to ilustrate. DATA LIST FREE /USER_ID(F2.0) SHOP(A5) PRODUCT(A8). BEGIN DATA 1 SHOP1 PRODUCT1 1 SHOP1 PRODUCT2 1 SHOP2 PRODUCT1 1 SHOP2 PRODUCT4 2 SHOP1…
Roland
  • 334
  • 2
  • 21
4
votes
2 answers

haven::read_sav showing value labels rather than codes

I'm using haven to import a .sav file into R. I wonder how to show value labels rather than numeric codes. In the following example I want to show Species names rather than numbers 1, 2, 3. library(haven) path <- system.file("examples", "iris.sav",…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
4
votes
2 answers

How do I copy a set of columns into new rows?

Sorry if this has been answered before, I'm not even sure how to search for it. I'm happy with any automated solution in R, VBA, or SPSS. I have a huge set of demographic data like this: ID <- c(1, 2, 3, 4, 5) State <- c("FL", "FL", "FL", "FL",…
ashurtz
  • 43
  • 5
4
votes
3 answers

Retain SPSS value labels when working with data

I am analysing student level data from PISA 2015. The data is available in SPSS format here I can load the data into R using the read_sav function in the haven package. I need to be able to edit the data in R and then save/export the data in SPSS…
Matt
  • 41
  • 4
4
votes
1 answer

Recoding a variable based on a list or set of values?

Is there syntax in SPSS that looks in a list or set of values? I have been unable to find a syntax that will use a list/set as reference. One use example is recode; DATASET ACTIVATE DataSet1. STRING V2 (A8). RECODE V1 ('a' = 'group1') ('b' =…
joshuaf59
  • 65
  • 4
4
votes
2 answers

SPSS: DO REPEAT with different numbers of matched variables

I have a dataset where each case has the following set of variables: VarA1.1 to VarA25.185 (total of 4625 variables) VarB.1 to VarB.185 (total of 185 variables) For each case, VarA1.1, VarA2.1, VarA3.1, etc. are all linked to the same VarB.1. I want…
ScienceStudent
  • 155
  • 1
  • 10
4
votes
2 answers

matplotlib graphs in SPSS

Is it possible to use any other graphing library in SPSS that the built in? I just discovered the python extensions that makes SPSS great. import matplotlib.pyplot as plt from numpy.random import rand fig, ax = plt.subplots() for color in ['red',…
destinychoice
  • 45
  • 3
  • 15
4
votes
2 answers

SPSS python throws discontinuous errors

Inspired by this question and answer I wrote a simple "set current working directory". But sometimes it throws this error: >Warning # 6894. Command name: BEGIN PROGRAM >The external program exit unexpectedly and lost its content, a new exteranl…
honetkri
  • 67
  • 5
4
votes
2 answers

Use of haven to read .sav (SPSS_ files): Change labelled vector to character string or factor

I am using the haven library to read an .sav (SPSS) file into R. Some of the values are read as a labelled vector. Here is an example of one: > str(df$instructional_practice) Class 'labelled' atomic [1:4136] 2 2 6 6 8 8 NaN NaN 17 1 ... ..-…
Joshua Rosenberg
  • 4,014
  • 9
  • 34
  • 73
4
votes
2 answers

Dynamic file path in SPSS

Currently I save files to the absolute file path SAVE OUTFILE='my/path/to/file.sav'. This is not optimal, so I would like to save files to dynamic/relative file paths like SAVE OUTFILE='file.sav'. So I need to set current directory, but this works…
Draco Malfago
  • 303
  • 5
  • 18