Dear Forum,
I have the following very basic problem I`m struggling to resolve. Unfortunately I couldn`t find an appropriate solution in the forum, but probably I was just unable to transfer the right solution to my problem, so please correct me in case there`s a thread out there already.
My data is structured as follows:
State Citysize City
1 1 1
1 2 2
1 3 3
2 1 4
2 5 5
2 2 6
3 1 7
3 3 8
I want to generate a variable that contains the ratio of observations between all cities sized 1 and all cities sized 3 per state. Let`s call it ratiocs; that I could use for a table of state/ratiocs, showing me the ratio between city size 1 and city size 3 per state. Any help would be highly appreciated, thank you in advance,
Benedikt
I have the following very basic problem I`m struggling to resolve. Unfortunately I couldn`t find an appropriate solution in the forum, but probably I was just unable to transfer the right solution to my problem, so please correct me in case there`s a thread out there already.
My data is structured as follows:
State Citysize City
1 1 1
1 2 2
1 3 3
2 1 4
2 5 5
2 2 6
3 1 7
3 3 8
I want to generate a variable that contains the ratio of observations between all cities sized 1 and all cities sized 3 per state. Let`s call it ratiocs; that I could use for a table of state/ratiocs, showing me the ratio between city size 1 and city size 3 per state. Any help would be highly appreciated, thank you in advance,
Benedikt
Comment