Hi Art. If I follow, I think this gives what you're looking for, or at least the numeric part of it.
SORT CASES BY State HouseSeat.
* Set Appearance = 1 on the first row for each State.
MATCH FILES FILE = * /BY State /FIRST=Appearance.
FORMATS Appearance (F5.0).
* Fill in the other values of Appearance.
IF Appearance EQ 0 Appearance = LAG(Appearance) + 1.
DESCRIPTIVES Appearance.
* Restore original sort order.
SORT CASES BY HouseSeat.
Art Kendall wrote
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.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/"When all else fails, RTFM."
PLEASE NOTE THE FOLLOWING:
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (
https://listserv.uga.edu/).