IBM Support

How to count distinct values in a variable and compute a variable with frequency for distincts per ID?

Question & Answer


Question

I am working with PASW Statistics and have one ID variable with multiple rows per person and a string variable with categories. I would like to compute a variable which includes the frequencies per distinct value of every unique ID, can this be done with Statistics? Example: ID: V1: 1 a 1 a 1 b 2 a 2 b 2 b 2 c In this example ID 1 should get the frequency value 2 in a new variable since in V1 are two categories for this ID and for ID 2 the value of 3 should be displayed in the new variable.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF033","label":"Windows"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Historical Number

83661

Document Information

More support for:
IBM SPSS Statistics

Software version:
Not Applicable

Operating system(s):
Linux, iOS, Windows

Document number:
417855

Modified date:
16 April 2020

UID

swg21476228

Manage My Notification Subscriptions