Couting number of Against, For and Abstain votes per party in every variable

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

hello11
Posts: 2
Joined: Tue Apr 12, 2016 3:37 pm

Couting number of Against, For and Abstain votes per party in every variable

Postby hello11 » Tue Apr 12, 2016 6:07 pm

Hello everyone
I’m doing an analysis in SPSS 21. I have made a dataset which looks like this

Image

There are 831 cases (those are all Members of European Parliament – MEP’s), from 28 countries and 9 parties.
There are 578 variables: Name of the MEP, his/her country, his/her party and Vote001 through Vote575. The information in the vote variables is coded like this:

Image

What I want to do is count per party how many MEP’s voted against, for and abstained, and to be able to use these three results to use them in a formula.
I already found the aggregate function which I can use to calculate the number of people who voted per party. I then obtain a dataset which looks like this

Image

But what I actually would like to have is something like this

Image

This way, I then would be able to use Compute Variable and use the number of Against, For and Abstain votes in a formula, per vote, per party.
Can somebody help me out in achieving something which seems quite basic to me?
Thanks a lot!
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Couting number of Against, For and Abstain votes per party in every variable

Postby GerineL » Wed Apr 13, 2016 8:20 am

you probably need the aggregate function, you can sum within columns per party.
hello11
Posts: 2
Joined: Tue Apr 12, 2016 3:37 pm

Re: Couting number of Against, For and Abstain votes per party in every variable

Postby hello11 » Wed Apr 13, 2016 8:27 am

I can indeed sum per party using the Aggregate function, but as it is not binary (0 or 1), but 0, 1 or 2, I still don't know how to be able to know the number of votes for those three categories.

How would you set up the Aggregate-function?

Image
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Couting number of Against, For and Abstain votes per party in every variable

Postby GerineL » Wed Apr 13, 2016 12:50 pm

if you do a break both on party and on vote, you can then specifically filter out the sum for the 1's with the if-function.

Who is online

Users browsing this forum: No registered users and 1 guest

cron