HOW TO CALCULATE A SUM OF COLUMN IN SPSS USING SYNTAX ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HOW TO CALCULATE A SUM OF COLUMN IN SPSS USING SYNTAX ?

Ubos
How can I calculate the total of a variable in SPSS using syntax? For example, calculating for each observation the variable Y as the sum of the column X (SEE EXAMPLE BELOW)

  XY
102
202
312
412

Thank you very much indeed for all contributors.
Reply | Threaded
Open this post in threaded view
|

Re: HOW TO CALCULATE A SUM OF COLUMN IN SPSS USING SYNTAX ?

Bruce Weaver
Administrator
Look up AGGREGATE.  Pay attention to the SUM function and the ADDVARIABLES mode.

Ubos wrote
How can I calculate the total of a variable in SPSS using syntax? For example, calculating for each observation the variable Y as the sum of the column X (SEE EXAMPLE BELOW)

  XY
102
202
312
412

Thank you very much indeed for all contributors.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).