1,998 questions
0
votes
0
answers
30
views
factor analysis, loadings not as expected
I ran an exploratory factor analysis in SPSS. There are supposed to be 9 items( factors) however the loadings are not as expected. The survey is a 5 point likert and all are quite highly rated. ...
0
votes
1
answer
34
views
two-way table of sums [closed]
I have two categorical variables, Student and CourseType, and one continuous variable, Units. I want a table that sums up the units for each pair of Student/CourseType. Like this:
Required
Elective
...
1
vote
1
answer
92
views
How do I change the names of thousands of variables in SPSS?
I have two SPSS datasets (a & b) that have identical variable names (eg. date, time, etc.). I want to combine them without confusion. Therefore, I want to change the variable names to reflect the ...
0
votes
0
answers
32
views
Can I exclude SPSS-Syntax error messages?
while running my last syntax (CTables-command) I´ve got for every table the error message that some columns are empty. Which is fine since I had three separate groups and for some questions only a ...
0
votes
0
answers
59
views
Survival analysis and varying entry times in SPSS?
I am running Cox regression using age as time-scale. In my data, study participants enter at different ages (variable "age_entry" below). I want to accommodate participant-dependent entry ...
1
vote
1
answer
37
views
spss conditional based on macro text
I'm trying to build a simple variable in spss like below but can't figure it out from documentation. In sas, you simply need to put qoutes around your macro to resolve. Can't figure out how in SPSS.
...
1
vote
1
answer
61
views
creating a variable, SPSS Macros vs SAS
been programming in SAS for 14 year and just jumped into SPSS.
In SAS you can combine a macro call and a text string very easily using a period.
i.e.
%let name = ted ;
data work1 ;
var = &name....
0
votes
0
answers
56
views
Repeated-measures ANOVA in WRS2 in SPSS returns p-value & F-statistic as NA
I am calculating a one-way repeated measures ANOVA using the WRS2 package in SPSS 29. To do that I installed the WRS2 package and tidyr package using the following code:
Begin Program R.
install....
0
votes
0
answers
34
views
Assumptions Moderation Process Macro
I am doing a moderation analysis via Process macro (SPSS). I want to check my assumptions (linearity, normality of the residuals, homoscedasticity of the residuals, multicollinearity, outliers, ...).
...
0
votes
0
answers
31
views
How to conduct PCA in SPSS and create factor plot by string entities (observations) and not by independent variables
I have the following sample file in Excel and need to conduct a Principal Component Analysis (PCA) in SPSS; however, I need to create a factor plot using the string entities defined in the first ...
0
votes
0
answers
43
views
Is there a way to match variables (e.g., grant number; number of hours) when aggregating and each person has multiple grant and hours?
enter image description hereI have an SPSS dataset in which persons have data in multiple rows. The rows represent a different agency and different grant hours. There are over 70 variables, which is ...
2
votes
1
answer
116
views
SPSS macro to add prefix to all variables in dataset
I'm planning to merge data from different sets, but before I do I'd like to add prefixes to all variables in each dataset so that we can later easily determine where the variables initially came from. ...
1
vote
1
answer
47
views
Why does my conditional filter returns positives every time?
I have a syntax in SPSS that worked fine before (for a different dataset) but is now acting up. It's a filter that allows me to select for a character string that isn't part of certain other character ...
0
votes
0
answers
80
views
How to make new variable in SPSS based on values from three other variables
In SPSS I need to make a new variable that are weights for survey results. I have the weights calculated, and they need to be added all depending on the values of the other three varaibles. So for ...
1
vote
3
answers
54
views
Count occurences (rows) between dates (SPSS)
I have data on surgeries, every row represent a patient with a performed surgery. I wish to answer the question: How many procedures has this surgeon performed in the last year (at that time of the ...
0
votes
0
answers
54
views
Which way is SPSS Fisher's Exact 1-sided Test reading my 2x2 Table?
I ran a 2x2 Chi-Square test in SPSS and have a significant result for the 1 Sided Fisher's Exact Test.
High
Not High
Group A
8
11
Group B
2
15
Fisher's Exact Test : Exact Sig (2-Sided) = .065
Fisher's ...
0
votes
1
answer
37
views
How to create a variable from count of instances of an existing variable in SPSS
I want to create a variable that is the count of instances of a certain year in my dataset in SPSS. To be more specific, I am analyzing the number of suicides before and after 1996. I have a data set ...
1
vote
2
answers
89
views
How do I exclude cases from a filter in a multi-filter syntax?
Not remotely an SPSS guy at all here so forgive the basicness of all this...
I want to search a large column of long strings (several English sentences) for certain strings. On the SPSS syntax file I ...
0
votes
1
answer
42
views
using a substring of a variable name in an SPSS macro
I want to rename a list of variables in a dataset that has thousands of variables. There are certain patterns in the renaming process and I tried to write a macro for this.
I want to drop the last ...
0
votes
2
answers
137
views
Excel messes up formatting of a file exported from SPSS and processed by VBA
I decided to ask this question here because I'm seriously facing the waste of nearly 1 month of work due to unknown reasons. Moreover, I can't tell whether the problem lies in what SPSS does, my VBA ...
0
votes
1
answer
245
views
How to run an SPSS 29 Syntax file from command mode?
I want to run an SPSS Syntax in command mode using IBM SPSS 29.
First I 'm using this commandline:
"path to SPSS executable" "path to syntax".
this works, but it only opens the ...
0
votes
3
answers
58
views
How to paste numbers in existing empy rows in variable using syntax in SPSS
I have a very very large data base with several observations coming from one participant (multiple participants, multiple lines per participant). I want to copy and paste a value in a column to fill ...
0
votes
0
answers
75
views
I am trying to replicate a decision tree from SPSS in python using DecisionTreeClassifier
I am trying to replicate a decision tree from SPSS in python using DecisionTreeClassifier. I am unable to do the following.
Unable to use a feature to do the first force split.
If I use the same ...
0
votes
1
answer
103
views
Why does converting a nested python dictionary into a pandas dataframe result in "has no attribute 'items' error?
I have a nested dictionary stored in the variable nested_dict_variable.
The dictionary is retrieved by using SPSS valueLabels Property (Python)
type(nested_dict_variable) results in dict.
print(...
0
votes
1
answer
90
views
Simple contrasts output from SPSS in R
I estimated a mixed model with the GENLINMIXED command in SPSS. In the model options I specified that I want to estimate simple contrasts for my interaction variable (category*group) by the variable &...
1
vote
1
answer
1k
views
SPSS If statement with multiple conditions
in SPSS syntax, I am trying to create a filter that indicates if all the variables are 1, it would return a summary variable indicating 1.
I've tried the following in the SPSS syntax:
if (var1 TO ...
-1
votes
1
answer
110
views
How can you change a continuous variable into a categorical variable?
I am trying to do a regression analysis, but I don't get any results when I include an interaction term. I think what goes wrong is that in the interaction, I either have a value of 0 or 4, but I ...
0
votes
1
answer
230
views
SPSS analysis for mixed design moderation model
I have the following conceptual model:
IV: Personality trait (measured on likert scale)
Moderator: low trust vs high trust
DV: initial price offer in a negotiation ( values can be between 5-15)
I have ...
2
votes
0
answers
115
views
SPSS Computing Sleep Duration
I want to compute the sleep duration of my participants. As items I have the bed time and the time they got out of bed (some went to bed before 00:00 and some after). Format is hhmmss.
To compute the ...
1
vote
1
answer
67
views
SPSS: Create a variable which reports the variable name of the MAX function
I need to create a variable in SPSS, that looks at a series of variables for the maximum value for each case, but reports the variable name (rather than the actual figure).
I know I can use the MAX ...
0
votes
0
answers
98
views
SPSS: GENLINMIXED command
I want to run a repeated measures fixed-effects binary logistic regression in SPSS.
I know that I have to use the GENLINMIXED command when I want to estimate a model with random effects. But if I do ...
1
vote
0
answers
40
views
What if using Friedman test on dependent variable that is nominal data?
I have a group of 30 participants who did a test for three times. Each time, The independent variable was changed and the participants reported their answers (dependent variable). The independent ...
0
votes
0
answers
75
views
SPSS R integration
How do you install packages in SPSS R integration?
I am always getting non-zero exit status error message even though I tried to install dependencies.
0
votes
1
answer
141
views
SPSS Custom Tables Nesting
I'm trying to nest nominal variables, but I keep getting the error that a scale variable may not be crossed or nested with another scale variable.
Here's the code I'm trying to use:
CTABLES
/VLABELS ...
2
votes
1
answer
39
views
Loop over years in SPSS Syntax
I have this code.
Select if (syear=1995 and Niedriglohn=1).
Frequencies NiedriglohnDauer.
I want to have the Frequencies of Niedriglohndauer for the year 1995 to 2020 each if Niedriglohn=1.
1
vote
1
answer
158
views
Create a new variable in SPSS based on different cases with the same "id" variable
I have a dataset which, in some cases, contains data of a particular score from multiple time points "score1" and "score2". So I want to create a new variable "prospective&...
0
votes
1
answer
103
views
Is there a way in SPSS syntax to add a name variable to a file path to be able to export output into excel format with the corresponding name?
I need to export and save SPSS output into Excel format for more than 100 people. I am trying to avoid renaming the files manually. Like in Python, I tried to add the full-name variable into the file ...
2
votes
1
answer
58
views
Using a Loop to run multiple VarToCases commands
I have a data set with 40 sets of 32 variables each. Each set of variables has the same 32 variables, named only by a different index: So, one set has A1_Themes1 A1_Themes2 ...; the next set has ...
0
votes
1
answer
59
views
Is there a way to plot 3 separate multiple regressions in the same plot?
belonging
safety
wellbeing
negpol
pospol
3.5
3.2
4.22
1.17
1.32
5.19
3.5
6.06
1.11
1.34
5.00
5.00
5.57
1.06
1.35
These are all scale vriables and some are subscales of larger measures.
negpol: 6 item ...
0
votes
1
answer
123
views
Different results of SPSS and Python KS-test to assess normality
Suppose that I have a series of data:
age;height
8;120
8;123
8;130
8;125
10;160
9;158
8;120
7;126
6;98
5;97
7;115
7;120
7;118
8;117
6;97
6;99
9;123
10;157
10;155
9;155
9;153
5;96
7;115
6;94
6;94
5;87
...
1
vote
0
answers
95
views
How to run mediation analysis in SPSS with three conditions (1 control and 2 treatments)
I have three conditions in my experimental design
Control (No treatment at all)
Treatment Level 1
Treatment Level 2
My hypothesis is that treatment Level 2 will increase DV better than the others (...
1
vote
1
answer
394
views
Time (hour/minute/am or pm) variables in SPSS
I am trying to calculate the length of time that a person sleeps. My dataset includes the following variables: SleepHour, SleepMinute, SleepAM_PM, WakeHour, WakeMinute, and WakeAM_PM. The hour ...
0
votes
1
answer
103
views
How can I merge three datasets, some of which are incomplete, into one, based on a shared unique value in one field?
I will be using qualtrics to deliver three surveys to children. So far the first survey uses the function ${e//Field/Login%20ID to provide the user with their 10 digit randomised code. They then ...
1
vote
1
answer
790
views
counting number of missing values for a row in SPSS Syntax
I have a survey based data with each row representing a particular respondent and each column representing a response for a particular question in the survey. I have a dataset 72 columns and 2417 rows....
0
votes
1
answer
1k
views
How do I install scripy into Python?
I am trying to install scripy into python using the administrator command on windows 10. the error message i get is:
note: This error originates from a subprocess, and is likely not a problem with ...
2
votes
2
answers
163
views
Is there a way I can generate the below cross tab in R?
[Crostab output from SPSS]
I want to generate the attached crosstab with R. Presently I used SPSS. The data frame that I used is below. variables (Maths_Set, Note_Book, School_Bag, Text_Book, Pen ) ...
1
vote
1
answer
111
views
How do I calculate the standardized value of multiple variables in SPSS?
I have 31 columns/variables (v1, v2, v3...) that I want to standardize by (v1-mean(v1)) / std(v1) and save this new value into a new column v1_std.
Is there a single formula for this? I'm currently ...
1
vote
2
answers
487
views
Fill in missing values in a row based on another column SPSS syntax?
I would like to fill missing row values with values from one designated column using spss syntax.
Current Table:(Measure_Table)
sID
Visit
value_1
value_2
value_3
value_Score
whyMissing
1
1
3
2
5
12
1
...
1
vote
1
answer
91
views
Reference a second data set in spss?
I have one table with IDs and rows of data that happened in different time points. Some IDs don't have all the timepoints because they either haven't happened yet, or the person was not eligible to ...
-1
votes
1
answer
319
views
can't install IBM SPSS Statistics 27 on LInux MInt
Whenever i try to install SPSS Statistics 27 on Linux Mint, it only installs the uninstall folder and the product.tar.gz file before it gives this unhandled exception:
Unhandled exception
Type=...