Hello, I am working with a dataset that contains demographics data that does not always align (i.e. someone can have multiple records and they do not always match). I am trying to code my program so that I can count how many times someone is reported as sex=female or sex=male and then I need to make a new variable for sex based on which outcome occurs the most. For example, this is kind of like what I have SSN Sex 111111 M 111111111 M 111111111 M 111111111 F And then I would want something like this (could look different, but this gist): SSN Sex1 N1 Sex2 N2 NewSex 111111111 M 3 F 1 M Does anyone have any ideas on how I can achieve this? TIA
... View more