Question & Answer
Question
How do I create a sum of different variables in SPSS for Windows? For example, V1 V2 V3 V4 SUM 2 8 12 3 25
Answer
Use SUM function to sum variables in SPSS
e.g
Transform / Compute
Sum = SUM(v1,v2,v3,v4)
The Syntax for this would be:
COMPUTE sum = SUM(v1,v2,v3,v4) .
EXECUTE .
You can also do the following if you have more variables:
COMPUTE sum_all=SUM(v1 TO v102).
EXECUTE.
If you don't use the SUM function and instead just use:
SUM = V1 + V2 + V3 + V4
The resulting SUM variable will be a system missing value IF there are any system missings in any of the summed variables (v1, v2, v3 or v4)
Related Information
Historical Number
21789
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21476898