I'm trying to create two new condition variables by using the following
syntax: IF condition='P'x1powercond=1. IF condition='N'x1powercond=-1. IF condition='P'x2powercond=-1. IF condition='N'x2powercond=1. EXECUTE. But I keep getting the following error message: >Error # 4305 in column 17. Text: x1powercond >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. >Execution of this command stops. When I check with variable view, however, all of the variables are set to either numeric or scale...not to string. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Error-4305-with-Syntax-tp5713405.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (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 |
If all variables, INCLUDING condition, are numeric, how can condition possibly have a value of 'P'???
Gene Maguin -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of nato123 Sent: Tuesday, May 29, 2012 12:33 AM To: [hidden email] Subject: Error 4305 with Syntax I'm trying to create two new condition variables by using the following syntax: IF condition='P'x1powercond=1. IF condition='N'x1powercond=-1. IF condition='P'x2powercond=-1. IF condition='N'x2powercond=1. EXECUTE. But I keep getting the following error message: >Error # 4305 in column 17. Text: x1powercond 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. >Execution of this command stops. When I check with variable view, however, all of the variables are set to either numeric or scale...not to string. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Error-4305-with-Syntax-tp5713405.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (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 [hidden email] (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 |
Free forum by Nabble | Edit this page |