Error 4382 Spss
Contents |
Problem(Abstract) When executing an IF command using Statistics Syntax, execution stops with the following error message: Error# spss error incorrect variable name 4285 in column
Spss Error 4381
the name is more than 64 characters, or it is not defined by a previous command. Execution an equals sign was not found when expected after a target variable in a compute command. of this command stops. Symptom Syntax being executed appears as: IF (MySourceVariable=MyValue1) MyTargetVariable=1. IF (MySourceVariable=MyValue2) MyTargetVariable=2. EXECUTE. Cause Error is displayed because the end-user failed to encapsulate the string text within apostrophes ( ' ) or double-quoation ( " ) marks. Because the values that the IF command is looking up is not surrounded by quotes or apostrophes, SPSS Statistics thinks that it is supposed to be looking up a variable name. Environment This issue is not depended on a specific platform Diagnosing the problem Review IF command and compare it to the example found in the Command Syntax Reference Guide > IF: IF with String Values IF (SEX EQ 'F') EEO=QUOTA+GAIN. * The logical expression tests the string variable SEX for the value F. * When the expression is true (when SEX equals F), the value of the numeric variable EEO is assigned the value of QUOTA plus GAIN. Both QUOTA and GAIN must be previously defined numeric variables. * When the expression is false or missing (for example, if SEX equals F), the value of EEO remains unchanged. If EEO has not been previously defined, it contains the system-missing value. Resolving the problem Surround the value of a string variable in apostrophe's or double-quote marks to successfully execute this command. The correct syntax would be: IF (MySourceVariable='MyValue1') MyTargetVariable=1. IF (MySourceVariable='MyValue2') MyTargetVariable=2. EXECUTE. Document information More support for: SPSS Statistics Statistics Desktop Software version: Not Applicable Operating system(s): Platform Independent Reference #: 1967706 Modified date: 2015-09-29 Site availability Site assistance Contact and feedback Need support? S
view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Scratch variable causing error in SPSS 21.0.0.2 (64-bit) Administrator I am running release 21.0.0.2 (64-bit) for Windoze under Windoze 7 Professional (SP1). The following lines are from a syntax file to test hypotheses about and generate confidence intervals for single regression coefficients: COMPUTE t = (b - bstar) / se. COMPUTE #tneg = 0 - abs(t). COMPUTE p = cdf.t(#tneg,df)*2. This syntax file worked perfectly under whatever version of SPSS I had when I wrote it (probably v19 or 20). But now, I get the following error messages in the http://www-01.ibm.com/support/docview.wss?uid=swg21967706 output window: COMPUTE t = (b - bstar) / se. COMPUTE #tneg 0 - abs(t). >Error # 4382 in column 16. Text: 0 >An equals sign was not found when expected after a target variable in a >COMPUTE command. >Execution of this command stops. COMPUTE p = cdf.t(#tneg,df)*2. >Error # 4285 in column 19. Text: #tneg >Incorrect variable name: either the name is more than 64 http://spssx-discussion.1045642.n5.nabble.com/Scratch-variable-causing-error-in-SPSS-21-0-0-2-64-bit-td5725706.html characters, or it is >not defined by a previous command. >Execution of this command stops. Notice that in the syntax that is echoed to the output viewer, the 'equals' sign has vanished from the line that computes #tneg. COMPUTE #tneg = 0 - abs(t). <-- in the syntax editor (it is there--I've checked) COMPUTE #tneg 0 - abs(t). <-- in the output viewer If I change #tneg to tneg in both lines where it appears, there are no errors. AND--this one is really bizarre--if I add a second 'equals' sign to that line (as shown below), again, it runs with no errors! COMPUTE #tneg == 0 - abs(t). <-- runs with no errors! This makes no sense. Any thoughts on what is going on here? If anyone wants to try the complete syntax file, it's file number 2 here: https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuenschThanks, Bruce -- Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/"When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. Art Kendall Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Scratch variable causing error in SPSS 21.0.0.2 (64-bit) there
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 10 Oct 2016 02:07:15 GMT by s_ac15 (squid/3.5.20)