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
2 answers

Dealing with system missing in R recode?

I'm making the leap from SPSS to R and I was wondering how you deal with system missings... For example, if I wanted to rewrite the following SPSS code into R: RECODE income (1 THRU 6 = copy) (else = SYSMIS) INTO income2 I am able to write the…
Johnny
  • 91
  • 1
  • 5
3
votes
2 answers

Value labels in R?

Thanks for all of the support that I've recieved on here so far. It is much appreciated! I'm trying to add value labels to an R variable. For example, I currently have this in SPSS: VARIABLE LABELS band_age_3 'Three-way banded age group'. VALUE…
Johnny
  • 91
  • 1
  • 5
3
votes
2 answers

Difficulty with haven package Reading SPSS data in R

I am trying to use the haven package to read spss data and am getting the following error: Error in df_parse_sav_file(spec, encoding, user_na, cols_skip, n_max, : Failed to parse ~FilePath/Dataset: The file's timestamp string is …
hcav
  • 41
  • 2
3
votes
1 answer

Dynamically create value labels with haven::labelled

I am using haven::labelled to set value labels of a variable. The goal is to create a fully documented dataset I can export to SPSS. Now, say I have a df value_labels of values and their value labels. I also have i df df_data with variables to…
oskjerv
  • 198
  • 7
3
votes
1 answer

How to set Variable Width and Decimals in SPSS with Python?

I'm trying to manipulate some .sav files with SavReaderWriter. What I already have is this: with savReaderWriter.SavReader(dirIn, ioUtf8 = True) as reader: df = pd.DataFrame(reader.all(), columns = [s for s in reader.header]) varLabels =…
3
votes
2 answers

Limiting decimal precision in calculations

I currently have a very large dataset in SPSS where some variables have up to 8 decimal places. I know how to change the options so that SPSS only displays variables to 2 decimal places in the data view and output. However, SPSS still applies the 8…
3
votes
2 answers

Exporting R value labels to SPSS file

I'm collaborating on a project with some people who only use SPSS although I use R. I'm trying to create a dataframe in R with variable labels and value labels for factor variables to export to SPSS. However, once I open the file in SPSS, I get the…
psoares
  • 4,733
  • 7
  • 41
  • 55
3
votes
0 answers

How to update code to create a function for calculating Welch's for polynomial trends?

I am trying to reproduce the SPSS output for significance a linear trend among means when equal variances are not assumed. I have gratefully used code from http://www-personal.umich.edu/~gonzo/coursenotes/file3.pdf to create a function for…
Cassandra
  • 137
  • 1
  • 9
3
votes
2 answers

Integer date from SPSS to Python date

I have dates imported from SPSS to Python via pandas. The dates are imported as integers (ordinal). For instance the date "2015-08-02" is imported as 13657852800. When I try pd.to_datetime(13657852800, unit="s") Traceback (most recent call last): …
Chriss Paul
  • 1,101
  • 6
  • 19
3
votes
1 answer

Delete rows and columns in SPSS usning Syntax

I wish to extract particular rows and columns in SPSS sheet but I dont want to give the exact names, rather something like column 1 to 10 and row 1 to 30. Is there a syntax to do this?
user10579790
  • 333
  • 1
  • 10
3
votes
0 answers

SPSS: SPSSINC MERGE TABLES for Custom and Significant Tests Tables

Can I know how to merge two tables using SPSSINC MERGE TABLES by rows/columns? I have tried using the following syntax but the output (orange cells) is not what I want : SPSSINC MERGE TABLES MATCHLABEL="Column N %" ATTACH=ROWS MODE=MERGE…
CHONG
  • 373
  • 1
  • 5
  • 13
3
votes
2 answers

how to save a pandas dataframe into a sav file

I have the following dataframe: import pandas as pd mc_all = pd.DataFrame({'col_1': [0,1,1,2], 'col_2' : ['france','france','uk','uk']}) I am trying this in order to save this dataframe into a sav file args = ( list(mc_all.columns),…
quant
  • 4,062
  • 5
  • 29
  • 70
3
votes
1 answer

Selecting variables in a dataset according to values in another dataset

I want to create a subset for a dataset which has around 100 variables and I wish to KEEP only those variables that are present as values of another variable in another dataset. Can someone pleae help me with a SPSS Syntax. This is what it should…
user10579790
  • 333
  • 1
  • 10
3
votes
1 answer

Extract a list of variables satisfying certain conditions and storing it in a new variable using SPSS Syntax

I have around 300 variables and I am calculating their Skewness and Kurtosis. Now, I want to create a new varaible which will consist of the list of all those variables whose Skewness and Kurtosis are within a certain range. The idea is to select…
user10579790
  • 333
  • 1
  • 10
3
votes
3 answers

How to manipulate or transpose a dataset for use in R or SPSS

I need to manipulate the raw data (csv) to a wide format so that I can analyze in R or SPSS. It looks something like this: 1,age,30 1,race,black 1,scale_total,35 2,age,20 2,race,white 2,scale_total,99 Ideally it would look like:…
blacksheep
  • 31
  • 1