How to compute this is nth time name occurred in a list?
Posted by
Art Kendall on
URL: http://spssx-discussion.165.s1.nabble.com/How-to-compute-this-is-nth-time-name-occurred-in-a-list-tp5740792.html
In Get Priority.sps, I am trying to apply these directions
https://www.census.gov/topics/public-sector/congressional-apportionment/about/computing.htmlto House2020.sav.
In the SPSS syntax, I have a sorted variable “Priority” which is the priority in which a seat is the House of Representatives is assigned a seat. So the first time Alabama occurs in the list it gets 1 assigned to “StateSeat” the second time Alabama occurs it gets a 2 assigned to “StateSeat” and so forth for all 50 states. The variable needed is “ this is the nth time the state occurred in the sorted list of priorities”.
Census Bureau’s results are shown in
2020PriorityValues.xlsx
Get_Priority.spsHouse2020.sav2020PriorityValues.xlsxAny suggestions would be appreciated.
Art Kendall
Social Research Consultants