Immigration / Emigration Model¶
Data¶
Statistics Canada does not contain immigration/emigration data broken down by the necessary
groups (age, sex, etc), so we do not have exact data for this category. Instead, we use the
data from the birth and death models.
Population Data¶
We use the Statistics Canada population data that was generated and saved as: processed_data/{time_delta_tag}/birth/initial_population.csv.
This table contains the number of people in a given age, sex, province, and projection scenario, along with the number of births for that timepoint. This data is the net number of people, factoring in death, immigration, and emigration.
Column |
Type |
Description |
|---|---|---|
|
|
the starting date / time of the time interval that the data applies to |
|
|
the age of the person in years |
|
|
the province of the person
(e.g., |
|
|
the number of people in a given age group, time interval, province, and projection scenario |
|
|
the number of births in that time interval, province, and projection scenario |
|
|
the proportion of the population in that age group, time interval, province, and projection scenario relative to the number of births in that time interval, province, and projection scenario |
|
|
the proportion of the population in a given age group, time interval, province, and projection scenario who are male |
|
|
the projection scenario used to generate the data |
Mortality Data¶
We use the Statistics Canada population data that was generated and saved as: processed_data/{time_delta_tag}/life_table.csv.
Column |
Type |
Description |
|---|---|---|
|
|
the starting date / time of the time interval that the data applies to |
|
|
the age of the person in years |
|
|
the province of the person
(e.g., |
|
|
|
|
|
the probability that a person of the given age and sex, living in the given province, will die during the given time interval. |
|
|
the standard error on the probability of death |
Processed Data¶
The migration model produces a single processed data file generated by
leap/data_generation/migration_data.py,
covering the provinces CA (all of Canada) and BC (British Columbia).
Saved as: leap/processed_data/{time_delta_tab}/migration/migration_table_{province}_{projection_scenario}.csv.
Each row corresponds to a unique combination of timepoint, province, age, sex, and
projection_scenario. The table records the signed net migration (\(\Delta n\)) for each
group, along with derived columns used by the simulation at runtime for both immigration and
emigration.
\(\Delta n\) is computed independently for each sex. Because males and females are computed separately, it is possible for one sex to have net immigration while the other has net emigration for the same age and timepoint.
Column |
Type |
Description |
|---|---|---|
|
|
the date / time of the time interval that the data applies to |
|
|
the province abbreviation ( |
|
|
the age in years |
|
|
|
|
|
the StatCan population projection scenario |
|
|
the signed net migration for this age, sex, timepoint, province, and projection scenario; positive values indicate net immigration, negative values indicate net emigration |
|
|
|
|
|
for cells where |
|
|
for cells where |
|
|
for cells where |
Model¶
The following variables will be used in the equations below:
Column |
Description |
|---|---|
\(x\) |
age in years |
\(s\) |
sex, one of |
\(t\) |
timepoint, in years |
\(\ell(x, t; s)\) |
number of people in the population of age \(x\), sex \(s\), at timepoint \(t\) |
\(\ell(x, t)\) |
number of people in the population of age \(x\) at timepoint \(t\), both sexes |
\(\ell(x = 0, t)\) |
number of births during the time interval starting at timepoint \(t\), both sexes |
\(\Delta n_{\text{migration}}(x, t; s)\) |
net migration at timepoint \(t\) for people of age \(x\) and sex \(s\) |
\(\Delta n_{\text{total}}(x, t; s)\) |
total change in population at timepoint \(t\) for people of age \(x\) and sex \(s\) |
\(\Delta n_{\text{deaths}}(x, t; s)\) |
total change in population due to deaths at timepoint \(t\) for people of age \(x\) and sex \(s\) |
\(q(x-\Delta t,\ t-\Delta t)\) |
probability that a person of age \(x-\Delta t\) at the previous timepoint will die during the time interval between the previous timepoint and the current timepoint |
Net Migration¶
To obtain the net migration during a time interval, for anyone aged > 0, we use the difference between the population at the current timepoint and the population at the previous timepoint, after accounting for deaths. This is computed separately for each combination of age, sex, province, and projection scenario. Age 0 is excluded because newborns are handled separately by the Birth Model.
Solving for \(\Delta n_{\text{migration}}\) gives us the net migration during that time interval:
If \(\Delta n_{\text{migration}} > 0\), the surplus is attributed to immigration. If \(\Delta n_{\text{migration}} < 0\), the deficit is attributed to emigration.
Note
Of course, this assumption is not in general true - for example, if \(\Delta n_{\text{migration}} = 50\), it could be the case that \(100\) people immigrated and \(50\) people emigrated, as opposed to our assumption that \(50\) people immigrated and \(0\) people emigrated. However, for the purposes of our model, it doesn’t matter how many people immigrated or emigrated, just the net effect on the population, so we make the simplifying assumption that all of the net change is due to either immigration or emigration, but not both.
Number of Immigrants¶
At each timepoint of the simulation, new agents are added to the model, and fall into one of two categories: newborns (handled by the Birth Model) or immigrants. The number of immigrants at a given timepoint of a given age and sex is given by:
The total number of immigrant agents created in a given time interval \(i(t)\) is:
where \(\ell(x=0, t)\) is the number of simulated births in that time interval.
prop_migrants_birth is computed as:
prop_immigrants_timepoint is computed as:
Probability of Emigration¶
At runtime, the simulation uses prob_emigration directly in a Bernoulli trial for each timepoint
to determine whether an agent emigrates:
prob_emigration is computed as:
Agents aged 0 are excluded — newborns never emigrate.