Date: Mon, 10 Jul 2006 13:15:15 -0700
Reply-To: Howie Harshaw <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Howie Harshaw <email@example.com>
Subject: LOOP Question
Content-type: text/plain; format=flowed; charset=ISO-8859-1
I have to do a series of analyses for six different communities in one
dataset. The communities are coded from 1 to 6. I the past, I have
created six different filters and had lots of code. It dawned on me
that there is a more parsimonious way of doing this, and I thought that
LOOP might work; having never used it before, I tried to adapt an
example form the syntax manual, but to no avail. I have pasted my code
below... what have I done wrong?
LOOP #I - 1 TO 6.
VARIABLE LABEL filter_$ '(Comm=#I) (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMAT filter_$ (f1.0).
FILTER BY filter_$.
FREQUENCIES /*Descriptive statistics for selected variables*/
VARIABLES=sec01_04 Sec02_03 Sec02_06 Sec02_10 Sec02_12 Sec11_04
/STATISTICS=STDDEV MINIMUM MAXIMUM SEMEAN MEAN MODE
/ORDER= ANALYSIS .
Thanks for any help you can provide,
Howard Harshaw, Ph.D.
Forest Resource Management
Faculty of Forestry