Question

I am currently using SPSS to process my data. eg. I have data like

V1 V2 V3

258 235

236 567

123 987

576 234

678 456

for the values of V3, I wanna compute the case of V1 minus the former case of V2 they are 236-235, 123-567, 576-987, 678-234

Because I have more than one million data , and I wanna do a loop compute

so how should I write in Syntax? Thank you!

Was it helpful?

Solution

Statistics automatically loops over the cases. You just need to write the compute statement. If you meant the previous case by "former case of V2", see the LAG function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top