Description Usage Arguments Value Author(s) References See Also Examples

Estimates migrant transitions flows between two sequential migrant stock tables.

1 2 |

`P1` |
Matrix of migrant stock totals at time |

`P2` |
Matrix of migrant stock totals at time |

`d` |
Vector of the number of deaths between time |

`b` |
Vector of the number of births between time |

`m` |
Matrix of auxiliary data. By default set to 1 for all origin-destination combinations. |

`method` |
Method used to adjust row margin totals of |

`b.mat` |
Matrix containing the number of births during the period in each birthplace (rows) by place of residence (columns) combination created by the user. By default, this argument is |

`d.mat` |
Matrix containing the number of deaths during the period in each birthplace (rows) by place of residence (columns) combination created by the user. By default, this argument is |

`b.deduct` |
Method used to deduct births. By default |

`...` |
Additional arguments passes to |

Estimates migrant transitions flows between two sequential migrant stock tables as shown in Abel (2013), when `method="outside"`

. The length of `b`

and `d`

must equal the number of rows in `P1`

and number of columns in `P2`

.

Setting `method="stocks"`

estimates migration flows using an alternative demographic accounting method to adjusted stock tables to match the row totals of the stock table after demographic accounting. Setting `method="deaths"`

uses the calculation of the deaths by place of residence table to match the row totals of the stock table after demographic accounting. Note, when `b`

and `d`

are equal, the same estimated flows from stocks are obtained regardless of the `method`

argument. Both of these options maintain the net migration flow implied by the population, birth and death data. I still need to write up these methods.

Setting `b.deduct="native.gt0"`

allows estimates to correct for cases where the number of births far exceeds the change in the native born population. Such cases potentially occur where place of birth stock data imply a change in native born population which directly conflict with changes in demographic data unless there is mass migration of all new borns.

Returns a `list`

object with:

`mu ` |
Array of indirect estimates of origin-destination matrices by place of birth. |

`it ` |
Iteration count. |

`tol ` |
Tolerance level at final iteration. |

`y ` |
Array of indirect estimates of origin-destination matrices by place of birth with additional rows and columns for births, deaths and moves to other regions. |

Guy J. Abel

Abel, G. J. (2016). Estimates of Global Bilateral Migration Flows by Gender between 1960 and 2015. *Vienna Institute of Demography Working Papers* 2/2016.

Abel, G. J. and Sander, N. (2014). Quantifying Global International Migration Flows. *Science*, 343 (6178) 1520-1522

Abel, G. J. (2013). Estimating Global Migration Flow Tables Using Place of Birth. *Demographic Research* 28, (18) 505-546

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ```
## create P1 and P2 stock tables
dn <- LETTERS[1:4]
P1 <- matrix(data = c(1000, 100, 10, 0, 55, 555, 50, 5, 80, 40, 800, 40, 20, 25, 20, 200),
nrow = 4, ncol = 4, dimnames = list(pob = dn, por = dn), byrow = TRUE)
P2 <- matrix(data = c(950, 100, 60, 0, 80, 505, 75, 5, 90, 30, 800, 40, 40, 45, 0, 180),
nrow = 4, ncol = 4, dimnames = list(pob = dn, por = dn), byrow = TRUE)
# display with row and col totals
addmargins(A = P1)
addmargins(A = P2)
# no births and deaths
b <- rep(x = 0, 4)
d <- rep(x = 0, 4)
y <- ffs(P1 = P1, P2 = P2, d = d, b = b)
# display with row, col and table totals
round(x = addmargins(A = y$mu), digits = 1)
# display with row and col totals
round(x = od_sum(y = y$mu), digits = 1)
## alternative offset term
dis <- matrix(data = c(1, 2, 3, 4, 2, 1, 5, 6, 3, 4, 1, 7, 4, 6, 7, 1), nrow = 4, ncol = 4)
y <- ffs(P1 = P1, P2 = P2, d = d, b = b, m = dis)
# display with row, col and table totals
round(x = addmargins(A = y$mu), digits = 1)
# display with row and col totals
round(x = od_sum(y = y$mu), digits = 1)
## alternative P2 and changes in population from natural increase
P2 <- matrix(data = c(1060, 60, 10, 10, 45, 540, 40, 0, 70, 75, 770, 70, 30, 30, 20, 230),
nrow = 4, ncol = 4, dimnames = list(pob = dn, por = dn), byrow = TRUE)
# display with row and col totals
addmargins(A = P2)
b <- c(80, 20, 40, 60)
d <- c(70, 30, 50, 10)
y <- ffs(P1 = P1, P2 = P2, d = d, b = b, method = "outside")
# display with row, col and table totals
round(x = addmargins(A = y$mu), digits = 1)
# display with row and col totals
round(x = od_sum(y = y$mu), digits = 1)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.