I ran it both ways and had a colleague also run it both ways. The command runs, no errors, but there is no output and no new variables. No output is suppressed. It is a mystery. I am going to try the macro Kirill shared today and hopefully that will work. Thanks for your help
Original Message:
Sent: Wed October 16, 2024 10:48 AM
From: Jon Peck
Subject: Creating Binary Variables from a Single Select Variable
I just saw that my reply last night didn't post.
What I said...
This is really strange. Are you running from the syntax window or the dialog box directly? If syntax, try justusing ok in the dialog box to rule out some other possibilities. You might also run an OMSEND comma d from the SE to make sure that no output is suppressed.
------------------------------
Jon Peck
Data Scientist
JKP Associates
Santa Fe
Original Message:
Sent: Tue October 15, 2024 03:43 PM
From: Ratna Wynn
Subject: Creating Binary Variables from a Single Select Variable
hi - I am with IT and we just installed V30 on my machine. I did run the syntax you shared to see if python is working and it did run the python code (see attached file with screenshot). But when I run the create dummies it does not work.
Here is the code I ran
DATASET ACTIVATE $DataSet.
SPSSINC CREATE DUMMIES VARIABLE=B5c1
ROOTNAME1=Binary_
/OPTIONS ORDER=A USEVALUELABELS=YES USEML=YES OMITFIRST=NO.
When I look at the variables there are no variables with the pre-fix Binary_. Is there something wrong with my syntax or is Python still not working.
------------------------------
Ratna Wynn
Original Message:
Sent: Tue October 15, 2024 03:36 PM
From: Jon Peck
Subject: Creating Binary Variables from a Single Select Variable
As long as you are on 29 or 30, just installing SPSS will automatically set up the Python and R interfaces. Do the install in Admin mode, but you don't need that mode just to run SPSS afterwards.
--
Original Message:
Sent: 10/15/2024 3:24:00 PM
From: Ratna Wynn
Subject: RE: Creating Binary Variables from a Single Select Variable
I am reinstalling SPSS but are there extra steps that are needed to get the python integration - do I need to install Python separately. We have bought a large number of licenses and this is an issue with all our licenses.
------------------------------
Ratna Wynn
Original Message:
Sent: Mon October 14, 2024 09:30 PM
From: Jon Peck
Subject: Creating Binary Variables from a Single Select Variable
I saw the error message in Jack's post. You didn't specify a rootname or rootnames. The rootname becomes the first part of the name of the generated variables. If you specify more than one variable, you would list a rootname for each one.
From the dialog box help...
Root Names. Specify names to be used as the prefix of all the dummy variables for each variable selected. Enter as many names as there are variables selected, separated by a blank. The dummy names will have the form rootname_n. If a variable with that name already exists, it is replaced.
--
Original Message:
Sent: 10/14/2024 6:43:00 PM
From: Ratna Wynn
Subject: RE: Creating Binary Variables from a Single Select Variable
Thanks Jon! I ran it but got no output. Here is the syntax I ran:
DATASET ACTIVATE $DataSet.
SPSSINC CREATE DUMMIES VARIABLE=B5c1
/OPTIONS ORDER=A USEVALUELABELS=YES USEML=YES OMITFIRST=NO.
I got the error below. Can you please help explain what I need to do
------------------------------
Ratna Wynn
Original Message:
Sent: Mon October 14, 2024 04:25 PM
From: Jon Peck
Subject: Creating Binary Variables from a Single Select Variable
Try the SPSSINC CREATE DUMMIES extension command, which appears under Transform. It can do many variables in a single command, and it will apply the value labels to the dummies.
--
Original Message:
Sent: 10/14/2024 4:06:00 PM
From: Ratna Wynn
Subject: Creating Binary Variables from a Single Select Variable
Hi - I am trying to create binary variables from a single select variable. I need every answer option to be recoded into 1/0 variables. While this can be done with the recode command it requires multiple recode statements and wondering if we have another command that can do this. If not, I'll proceed as planned.
Also, is there a way for SPSS to automatically pick up the value labels in the question.
thanks in advance! Ratna
------------------------------
Ratna Wynn
------------------------------