# Calculating a proportion Classic List Threaded 3 messages Open this post in threaded view
|

## Calculating a proportion

 Here’s a description of what I want to do: I have XX survey participants where variable A is the number of cases each year that each participant handles and variable B is the total number of yes’s among those A cases. So I can easily calculate a variable C that is the proportion of yes’s per participant as B/A. …but how do I work with a single value in SPSS to get an overall proportion of yes’s among all participants. E.g., if there are 2500 cases total for the 100 participants and 250 of those are yes’s how can I use SPSS syntax to print out 10% - 250/2500 ? Stated another way, I need to Sum B among the 100 and divide by Sum A. Obviously, I can do this by hand, but it has to be done numerous times so I want to do it within spss. Jeff  ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD