a variable list names the variables you want to work with.
Use the actual variable names, not their relative position in the file.
Post by Art KendallHey,
count IPP = var1 to var4(1)
Is this supposed to find all variables in your database from the 1st
to the 4th? If for example the specific variables are the 20th to the
IPP = var20 to var24(1) and hit run?
GET
FILE='C:\Users\gebruiker\Desktop\SPF\Weekly Schedule\Week 6-10
Jan\Monday\Analysis 2nd
Survey\Second_CleanData\Second_Survey_CleanDara.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.
count IPP = var1 to var4(1).
Error # 4285 in column 13. Text: var1
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
Execution of this command stops.
Error # 4285 in column 21. Text: var4
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
count IPP = var451 to var48(1).
Error # 4285 in column 13. Text: var451
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
Execution of this command stops.
Error # 4285 in column 23. Text: var48
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
count IPP = var45 to var48(1).
Error # 4285 in column 13. Text: var45
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
Execution of this command stops.
Error # 4285 in column 22. Text: var48
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
count IPP = var45 to var48(1).
Error # 4285 in column 13. Text: var45
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
Execution of this command stops.
Error # 4285 in column 22. Text: var48
Incorrect variable name: either the name is more than 64 characters,
or it is
not defined by a previous command.
assuming 'yes' is coded as 1 use
count IPP = var1 to var4(1).
Art Kendall
Social Research Consultants
I am an SPSS novice, and I found this group recently when
I was trying
to determine how to combine two categorical into one
variable in SPSS.
I did not find an answer online, but I did eventually
figure out how
to do it. I decided to post it here to the benefit of others.
I had one variable for Sex (1: Male; 2: Female) and one
variable for
Equally or Neither
Masculine Nor Feminine; 3: Feminine). I wanted to be able
to compare
Masculine Males, et cetera in post hoc analyses.
IF ((var1 = 1) & (var2 = 1)) newvar= 1.
EXECUTE.
IF ((var1 = 1) & (var2 = 2)) newvar= 2.
EXECUTE.
IF ((var1 = 1) & (var2 = 3)) newvar= 3.
EXECUTE.
IF ((var1 = 2) & (var2 = 1)) newvar= 4.
EXECUTE.
IF ((var1 = 2) & (var2 = 2)) newvar= 5.
EXECUTE.
IF ((var1 = 2) & (var2 = 3)) newvar= 6.
EXECUTE.
I have a question on similar, but different grounds.
There are 7 different variables in our survey: 1)contacted a
politician, government, or local government official?,
2)worked in a political party or action group?, 3)worked in
another political organisation or association?, 4)worn or
displayed a campaign sticker/ badge?, 5)signed a petition?,
6)taken part in lawful public demonstration?, 7)boycotted
certain products?.
The response categories are: yes, no, i don't remember.
We want to create two new variables. The first one will be
called "Institutionalized Political Trust" (IPP) and the
second one "non-Institutionalized Political Trust" (NIPP).
Can we recode into different variables (SPSS) in order to
create the IPP variable out of the 4 initial variables and the
NIPP variable out of the e remaining initial variables? So,
IPP should be a new variable including initial variables 1-4
and the INPP should be a second new variable including initial
variables 5-7.
If yes, how can we do that?
Thank you!