Date: Thu, 17 Jun 2010 04:53:43 +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: what does this error information mean?
In-Reply-To: <889924.69428.qm@web111813.mail.gq1.yahoo.com>
Content-Type: multipart/alternative;
Dear Khaing,
If I understand you correctly, you want to add up
1) var1a2) var1b to var 10a/*-> var1b, var10a and all variables that are located between them3) var10b
and divide this by 4.
Please try
COMPUTE consumptionfood = (sum(HE1C,HE1D TO HE10C,HE10D))/*4.execute.
HTH,
Ruben van den Berg
Consultant Models & Methods
TNS NIPO
Email: ruben.van.den.berg@tns-nipo.com
Mobiel: +31 6 24641435
Telefoon: +31 20 522 5738
Internet: www.tns-nipo.com
Date: Wed, 16 Jun 2010 21:36:12 -0700
From: khsoe1@yahoo.com
Subject: what does this error information mean?
To: SPSSX-L@LISTSERV.UGA.EDU
Dear Listers,
To perform computing task - summation of variables var 1a + var1b to var 10a + var 10b followed by dividing the result with 4.
The follwing code was used and not worked.
COMPUTE consumptionfood = ((HE1C+HE1D) TO (HE10C+HE10D))*4.
VARIABLE LABELS consumptionfood 'Monthly Consumption Expenditure for Food'.
COMPUTE consumptionnf =( (HE11B+HE11C) TO (HE15B +HE15C)) + ( ( ( HE16B+HE16C) TO (HE21B + HE21C) ) / 12).
VARIABLE LABELS consumptionnf 'Monthly Consumption Expenditure for Non Food'.
COMPUTE consumptiontotal= consumptionfood + consumptionnf.
VARIABLE LABELS consumptiontotal ' Monthly Consumption Expenditure'.
EXECUTE .
The error mesage says TO key word is not appropriate other than SUM and MEAN.What should be used instead? or where am I wrong? Please advise.
Thanks,
Khaing Soe
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
[text/html]
|