Date: Wed, 22 Sep 1999 21:06:16 -0400
Reply-To: Raynald Levesque <rlevesque@VIDEOTRON.CA>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Raynald Levesque <rlevesque@VIDEOTRON.CA>
Subject: Re: aggregation funtion
Content-type: text/plain; charset=iso-8859-1
Hi giuseppe and listers!
Suppose your variable is called "amount" and that you need the mean, min and
max value of amount in your syntax.
Unfortunately, you cannot use something like
Compute diff = v1 - Mean (amount).
Instead you may use something like the following (there are other ways but
this is often the simplest method, give us more details if this is not a
satisfactory solution in your case):
(Replace the file name in the aggregate and match commands by your path and
/mean_v = MEAN(amount) /min_v = MIN(amount) /max_v = MAX(amount).
MATCH FILES /FILE=*
You can now use:
Compute diff = v1 - mean_v.
Compute diff = v1 - min_v.
Compute diff = v1 - max_v.
Raynald Levesque firstname.lastname@example.org
----- Original Message -----
From: giuseppe vergani <jupiter@GALACTICA.IT>
Sent: Wednesday, September 22, 1999 8:53 PM
Subject: aggregation funtion
> Is there no way to use aggregation function in syntax? I've to write
> formulas containing min, max and mean values of variables, but it seems
> I've have to write something like this:
> Compute diff = v1 - Mean (v2)
> where MIN (v2) is the mean value of the variable V2.
> Thanks a lot
> Giuseppe Vergani