| Date: | Tue, 5 Jun 2001 17:35:26 -0400 |
| Reply-To: | "Eyster, Sandra" <seyster@AIR.ORG> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | "Eyster, Sandra" <seyster@AIR.ORG> |
| Subject: | Re: Computing Mean-Centered Values w/Syntax |
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
I don't have the syntax in front of me but use AGGREGATE to create a file
that contains the mean of a variable (or variables). Next merge it back
into the original data file. You can then compute the mean-centered value
(e.g., compute cvar=var-mvar). This approach has the advantage of avoiding
multiple steps and can be done easily for multiple variables.
-----Original Message-----
From: Carol Albright [mailto:syzygy@TC.UMN.EDU]
Sent: Tuesday, June 05, 2001 5:13 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: Computing Mean-Centered Values w/Syntax
At 11:17 AM 6/5/01 -0500, you wrote:
>Does anyone know how to create mean-centered values for variables using
>syntax?
>thanks,
>Craig
Hi, Craig
This is what I've done for another project (the statistician said to
subtract the mean from the raw value):
1) Compute the means of the variables:
freq vara varb /formats=notable/stats = mean.
2) Compute the centered variable:
Say the mean for VARA is 2.13:
compute varac = (vara - 2.13).
variable labels varac "Variable A Centered Around Mean (var - mean)".
execute.
There might be a zippier way of doing this with macros for a whole bunch of
variables.
Carol
-------------------------------------------------------------------------
Carol L. Albright, MS | E-Mail : syzygy@tc.umn.edu
Albright Consulting | Phone : 651/699-7218
St. Paul, MN 55105 USA | Research data services
http://www.tc.umn.edu/~syzygy (SPSS tips now on own pages)
-------------------------------------------------------------------------
|