Date: Fri, 21 Jun 2002 11:30:28 -0400
Reply-To: Mark Casazza <Mark.Casazza@domino1.cuny.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Mark Casazza <Mark.Casazza@domino1.cuny.edu>
Subject: Re: problem computing
In-Reply-To: <1CB8A7DEDD2F85429AB2B0FE79B927C601692DED@m0mail.healtheast.loc>
Content-Type: text/plain; charset="iso-8859-1"
Hi Katherine,
Should your 16th item be q23i rather than 23i? That is the only thing that
doesn't look "right." If that isn't it, make sure the command before the
COMPUTE statement is terminated correctly. And if that isn't it, I don't
have any other suggestions. FWIW, the easiest way to spot typos is to use a
fixed width font and then line up the elements (decimals, math symbols
(+,-,*,/), parentheses, &c) like:
compute rawpcs12 = sum(
( -7.23216*q5i ) + (-3.45555*q6i ) + (-6.24397*q7i ) +
( -2.73557*q8i ) + (-4.61617*q9i ) + (-5.51747*q10i) +
(-11.25544*q13i) + (-8.38063*q14i) + (-6.50522*q15i) +
( -3.80130*q16i) + (-8.37399*q1i ) + (-5.56461*q2i ) +
( -3.02396*q3i ) + (-1.31872*q4i ) + (-2.44706*q22i) +
( -2.02168*23i ) + (-1.6185 *q24i) + (-1.14387*q25i) +
( -0.42251*q26i) + (-0.33682*q32i) + (-0.94342*q33i) +
( -0.18043*q34i) + ( 0.11038*q35i) + ( 3.04365*q11i) +
( 2.32091*q12i) + ( 3.46638*q17i) + ( 2.90426*q18i) +
( 2.37241*q19i) + ( 1.36689*q20i) + ( 0.66514*q21i) +
( 4.61446*q27i) + ( 3.41593*q28i) + ( 2.34247*q29i) +
( 1.28044*q30i) + ( 0.41188*q31i)
).
execute.
HTH.
Mark V. Casazza
Director of Academic Information
The City University of New York
555 W. 57th St. Suite 1240
New York, NY 10019
phone: 212.541.0396
fax: 212.541.0392
email: Mark.Casazza@mail.cuny.edu
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Grimm, Katherine
Sent: Friday, June 21, 2002 10:57 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: problem computing
Hi
This is probably a very simple problem. I'm a new SPSS user.
I am trying to compute a value in syntax, but I keep getting the following
error message:
Error # 4007 in column 29. Text: I
>The expression is incomplete. Check for missing operands, invalid
>operators, unmatched parentheses or excessive string length.
>This command not executed.
The following is the syntax I wrote:
compute rawpcs12 = sum((-7.23216*q5i)+(-3.45555*q6i)+
(-6.24397*q7i)+(-2.73557*q8i)+(-4.61617*q9i)+
(-5.51747*q10i)+(-11.25544*q13i)+(-8.38063*q14i)+
(-6.50522*q15i)+(-3.80130*q16i)+(-8.37399*q1i)+
(-5.56461*q2i)+(-3.02396*q3i)+(-1.31872*q4i)+
(-2.44706*q22i)+(-2.02168*23i)+(-1.6185*q24i)+
(-1.14387*q25i)+(-0.42251*q26i)+(-0.33682*q32i)+
(-0.94342*q33i)+(-0.18043*q34i)+(0.11038*q35i)+
(3.04365*q11i)+(2.32091*q12i)+(3.46638*q17i)+
(2.90426*q18i)+(2.37241*q19i)+(1.36689*q20i)+
(0.66514*q21i)+(4.61446*q27i)+(3.41593*q28i)+
(2.34247*q29i)+(1.28044*q30i)+(0.41188*q31i)).
execute.
Can anyone quickly eyeball the problem?
Many thanks.
Katherine