LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2009)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 1 Jun 2009 08:53:59 +0000
Reply-To:     Ruben van den Berg <ruben_van_den_berg@hotmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Ruben van den Berg <ruben_van_den_berg@hotmail.com>
Subject:      Re: compute + do if commands
In-Reply-To:  <15509.90968.qm@web110104.mail.gq1.yahoo.com>
Content-Type: multipart/alternative;

Dear Ismail,

The variable weightage doesn't exist before you run the syntax below, right? I'd expect an error like you posted if weightage would have been previously declared a string variable (or preexisted in your data as a string variable).

Kind regards,

Ruben

Date: Sun, 31 May 2009 10:38:41 -0700 From: noori39@yahoo.com Subject: compute + do if commands To: SPSSX-L@LISTSERV.UGA.EDU

Can some one tell me what is wrong with this syntax? Every time and run it it SPSS give me an error that reads like this:

>Error # 4305 in column 1. Text: COMPUTE >A relational operator may have two numeric operands or two character string >operands. To compare a character string to a numeric quantity, consider using >the STRING or NUMBER function. >This command not executed. Do IF howoldareyou='4' Compute weightage=0/3.

This is the Syntax........

DATASET ACTIVATE DataSet3. COMPUTE weightage=15/8. Do IF howoldareyou='1' COMPUTE weightage=26/19. Do IF howoldareyou='2' COMPUTE weightage=32/40. Do IF howoldareyou='3' COMPUTE weightage=26/31. Do IF howoldareyou='4' Compute weightage=0/3. Do IF howoldareyou='5' End If. EXECUTE .

Thanks.........

Ismail K. Noor, Ph.D., noori39@yahoo.com http://www.dennonoor.com (313) 690-0755 (cell)

_________________________________________________________________ What can you do with the new Windows Live? Find out http://www.microsoft.com/windows/windowslive/default.aspx


[text/html]


Back to: Top of message | Previous page | Main SPSSX-L page