I have got a problem with SPSS that I can't solve by myself.
In my data, there is a variable which encodes the lenght of hospitalisation (from 0 to 4 000 days), and another variable which encodes the result of one diagnostic test (positive/ negative, 1/0).
I would like to compute the sum of all the negative results for one given lenght of hospitalisation, and the sum of all the positive results. This way, I will be able to get the yield of my diagnostic test (sum of positives / (sum of positive + sum of negative) for each lenght of hospitalisation (maybe just from 0 days to 30 days).
I can easily compute new variables when it adds data horizontally in SPSS but I don't know how to do it vertically in my case.