+ Reply to Thread
Results 1 to 3 of 3

Thread: Use information about a variable vertically

  1. #1
    Points: 1,124, Level: 18
    Level completed: 24%, Points required for next Level: 76

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use information about a variable vertically



    Hello,

    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.

    I will be very grateful if you can help me !

  2. #2
    Points: 212, Level: 4
    Level completed: 24%, Points required for next Level: 38

    Posts
    19
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Use information about a variable vertically

    One way is to use
    Analyze->Reports

    Then move over Length of Hospitalization into the Variable box,
    and move over Result of Diagnostic Test into the Grouping Variable box.

    Then click the "Statistics..." button, and move over "Sum" from the "Statistics:" list to the "Cell Statistics:" list.

    Then press "Continue" and "OK" to see the sums.

  3. #3
    Points: 1,124, Level: 18
    Level completed: 24%, Points required for next Level: 76

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use information about a variable vertically


    Thank you for your quick answer !

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats