« Return to Thread: Help with Compute Variable problem

Re: Help with Compute Variable problem

by Art Kendall :: Rate this Message:

Reply to Author | View in Thread

If you are using SPSS, I strongly suggest that you emphasize that the GUI is a handy way to generate the first draft of syntax. 

It is a good habit to develop to exit the GUI via <paste> .

Art Kendall
Social Research Consultants

tara.dennehy wrote:
Thank you everyone for your help.  Through various messages/exchanges it
appears that the problems may be due to this particular iteration of SPSS
(16.0.1 for Mac), as I receive the same error(s) when working on computers
in my lab that are running the same version.  Everything (the
point-and-click compute variables and the syntax) works fine on SPSS 17 for
Mac.  I also had other people test the compute variable function to see if
was just me having the problem and it does appear to be the program.

To recap (for anyone reading, as most of the exchanges were via email), I
had two separate issues regarding computing variables.  The first issue was
that every syntax command I entered prompted me for a Python plug-in.  The
syntax was as follows:

compute Necessity_mean=mean(Spanishspeaker_Necessity,
Cancerpatient_Necessity, Doctor_Necessity, Moviebuff_Necessity,
Heterosexual_Necessity, Lowerclass_Necessity, Old_Necessity,
Small_Necessity, Schizophrenic_Necessity, Male_Necessity,
Extrovert_Necessity, Attractive_Necessity, Smart_Necessity,
Jew_Necessity, Paraplegic_Necessity, Asian_Necessity, Black_Necessity,
Liberal_Necessity, Vegetarian_Necessity, Easterner_Necessity,
Englishspeaker_Necessity, AIDSpatient_Necessity, Mechanic_Necessity,
Sportsfan_Necessity, Homosexual_Necessity, Middleclass_Necessity,
Young_Necessity, Large_Necessity, Depressive_Necessity,
Female_Necessity, Introvert_Necessity, Ugly_Necessity,
Average_Necessity, Catholic_Necessity, Blind_Necessity,
Hispanic_Necessity, White_Necessity, Republican_Necessity,
Meateater_Necessity, Midwesterner_Necessity).
execute.

My syntax editor didn't wrap; hence the lack of indents on each line break.
However, I received the same python-requesting error when using syntax and a
data file sent to me from Tim at SPSS.  The syntax works fine on other
versions of SPSS (the problem may be due to the fact that my university is
running an older version that has not been updated).

The second problem was in the point-and-click interface, which was what I
was primarily concerned about.  The compute function would work just great
for up to 10 variables, but after that the output would just read "EXECUTE"
without actually performing anything.  Later editions of SPSS (Mac 17) do
not seem to have this problem.

I apologize for the delay in responding; I had a class to teach and meetings
all day.  Thank you everyone for your help in attempting to resolve this
issue.

Best,
Tara.

P. S.  I had not initially included the syntax as I was primarily concerned
about the problem with the point-and-click interface, given that it is
somewhat more idiot-proof than syntax ;-)



Bruce Weaver wrote:
  
David Marso wrote:
    
Tara,
A tiny bit of detail WRT what you are actually doing would be useful.
Other than that you don't need any Python Plugin for standard usage.
"I need to
      
create 10 variables computed from 40 variables each and 40 variables
computed from 20 variables each"
        
Specifically???
"I tried entering the command as syntax".
Spending a few seconds to have pasted the syntax might have led to your
receiving a useful response.  Try again.
"If anyone has any magical inspiration regarding this problem (I've tried
aggregating to require less computing oomph, rebooting, saving as
variables,"....
ROFLMAO!


      
The same question appeared in the SPSS group on usenet
(comp.soft-sys.stat.spss).  After prompting, Tara did post one of the
troublesome COMPUTE commands there, and Fred Sutton spotted that the
continuation lines were starting at the left margin.  Inserting a space at
the beginning of each continuation line fixed the problem.   Well, it did
for Fred at least.  We've not heard back from Tara yet.  ;-)


    

--
View this message in context: http://www.nabble.com/Help-with-Compute-Variable-problem-tp24348001p24366482.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@... (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


  
===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@... (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

 « Return to Thread: Help with Compute Variable problem