Ranjan,

You can do it easily as shown below. But before you must also understand

that your data file is a matrix giving you the value of each variable for

each unit of analysis. The mean is a summary value which does not belong

with any of the individual cases, but with the ensemble of them all. You

can, of course, add a "variable" showing the mean value of another variable;

this new variable will have the same value for all the individual cases,

which is somewhat redundant.

Also, you may want to think whether you want only the general means (that is

the mean value of a variable in ALL your cases) or subgroup means (e.g. the

mean for males and the mean for females).

Now, assuming you need the overall mean for all cases for your 158

variables, the easiest way to obtain them as a statistical result in your

output window is:

DESCRIPTIVES ALL /STAT MEAN.

Alternatively:

MEANS ALL/CELLS MEAN.

This refers to ALL your variables, for simplicity, although you may not want

the mean of ALL of them if they include sex, place or residence or other

variables for which the mean does not make sense. Also, if some variables

are non-numeric strings SPSS may not understand what you mean and refuse to

proceed. You may simply state the specific variable list you need, such as:

DESCRIPTIVES VAR001 TO VAR158/STAT MEAN.

(assuming the 158 variables are consecutively situated in the data file).

The DESCRIPTIVES procedure produces summary statistics for all your cases.

The syntax above asks only for the mean, since you do not need other summary

measures (minimum and maximum values, median, mode, etc.). In case you need

them, simply write /STAT ALL instead of /STAT MEAN to have the full

complement of summary descriptive statistics for all your variables.

The MEANS procedure produces the mean and other summary statistics for

subgroups of cases. In the syntax above no subgroups are specified, so only

the overall mean is produced. But you could specify breakdown variables, as

follows:

MEANS ALL BY SEX BY AGEGROUP/cell mean.

This produces the mean value of each variable for each sex- age group

combination. Omitting the second BY produces two tables, one giving the mean

for both sexes irrespective of age and the other giving the mean for all age

groups irrespective of sex.

If you want to add the means to your file, for instance in order to compare

each individual case to the overall mean, you can do it with AGGREGATE.

COMPUTE X=1.

AGGREGATE OUTFILE * MODE ADDVARIABLES /BREAK X

/MEAN001 TO MEAN158 = MEAN(VAR001 TO VAR158).

Hope this helps.

Hector

-----Mensaje original-----

De: SPSSX(r) Discussion [mailto:

[hidden email]] En nombre de

ranjan vaidya

Enviado el: Monday, July 17, 2006 2:35 PM

Para:

[hidden email]
Asunto: mean

i need assistance in adding the cases:

is it not possible to compute the sum of the cases of a variable and

have the result in the same file....

i want to find the difference of the means for two varible i.e. the

mean of one minus the mean of other...and i have some 158 varibles how

to do that????

--

Ranjan Vaidya

K 404 Shalimar Township

AB Road Indore MP

452010 INDIA