I am looking at immigration data, looks somewhat like this:
As you can see, rows 1 and 2 are for the same country and same year, the only difference being "type of migration"; in one case it is inflow, in the next, outflow (the same is true for 3 and 4)
How would I go about creating a "net inflow" variable, which would simply be the inflow - outflow for each country, for each year?
Austria | Belgium | 1999 | Inflow | 2,100 | |
Austria | Belgium | 1999 | Outflow | 1,500 | |
Germany | Portugal | 2000 | Inflow | 1000 | |
Germany | Portugal | 2000 | Outflow | 2000 |
How would I go about creating a "net inflow" variable, which would simply be the inflow - outflow for each country, for each year?
Comment