Immigrants and descendants
How Statistics Denmark defines immigrants, descendants and country of origin, and what to check before you group people by them
Use this page if your study needs to describe or adjust for immigrant status or country of origin. The registers do not hold ethnicity. They hold what the Civil Registration System (CPR) records about birthplace and citizenship, for the person and for the parents, and Statistics Denmark (DST) derives groups from that. This page says how DST defines the groups and what to check before you use them.
SEPLINE (the national guideline on socioeconomic position in register research), the national guideline behind the socioeconomic variables, says the same: country of origin and immigration status are an attempt to approximate ethnic minority status, not ethnicity itself (Hjorth et al. 2025, section on ethnicity).
Before this page: cohort, with pnr and index_date (Comparison cohort); row_id, one id per cohort row (Socioeconomic variables).
Where the variables are
| Information | Register | Variables | From |
|---|---|---|---|
| Person of Danish origin, immigrant or descendant | BEF (the population register) | ie_type |
1985 |
| Country of origin | BEF | opr_land |
1985 |
| Date, direction and country of each migration | VNDS | haend_dato, indud_kode, indud_land |
1973 |
| First and latest immigration | BEF | foerste_indvandring, seneste_indvandring |
2004 |
| Months of residence in Denmark | BEF | opholdmd_dk |
1985 |
| Ground of residence, for example refugee | OPHG (opholdsgrundlag, ground of residence) | kategori, grundlag, forklar |
1997 |
BEF is the population register and VNDS the migration register. DST closed VNDS in February 2026 and split it into VNDS_ind, VNDS_ud and VNDS_hist; see VNDS in Registers and variables for which one you have. Sources: Hjorth et al. 2025, Table 13, and DST’s variable list for BEF. SEPLINE gives 2004 for all three BEF migration columns, but DST’s variable list has opholdmd_dk from 1985. Column lists for BEF and VNDS are in Registers and variables.
Immigrant, descendant or Danish origin (ie_type)
DST’s definitions, from its documentation of IE_TYPE:
| Code | Group | DST’s definition (our translation) |
|---|---|---|
| 1 | Persons of Danish origin | At least one parent is both a Danish citizen and born in Denmark, wherever the person was born. |
| 2 | Immigrants | Born abroad, and no parent is both a Danish citizen and born in Denmark. |
| 3 | Descendants | Born in Denmark, and no parent is both a Danish citizen and born in Denmark. |
| 9 | Not stated (uoplyst) |
The codes and labels are in DST’s classification Herkomst, v1:1980, valid from 1 January 1980 and still valid. DST’s own page for IE_TYPE says that the variable has no value set, so run count(ie_type) on your own delivery to see which codes it holds, including the one for unknown.
When no parent is known, DST uses the person’s own information: if there is no information on either parent and the person was born abroad, the person is also counted as an immigrant (our translation). A person with no known parent who is a foreign citizen is a descendant, and a person with no known parent who was born in Denmark is of Danish origin. Read literally, the last two clauses overlap: a person born in Denmark with no known parent who is a foreign citizen fits both, and DST does not say which wins. Such persons are few, but if your study is about origin, look at how ie_type codes them in your delivery.
Country of origin (opr_land)
opr_land is a country code, and it is not the country of birth. DST defines it from birth country and citizenship country by these rules (DST, OPR_LAND):
- A person of Danish origin always has Denmark.
- If no parent is known, the origin is taken from the person’s own information. For an immigrant it is the country of birth, for a descendant the country of citizenship.
- If only one parent is known, it is that parent’s country of birth, or the parent’s country of citizenship if the parent was born in Denmark.
- If both parents are known, it is the mother’s country of birth, or her country of citizenship if she was born in Denmark.
So a descendant’s country of origin follows the parents, not the place where the descendant was born. DST’s definition does not tell you whether one of the parents was born in Denmark. SEPLINE suggests a separate group for people of Danish origin with one parent born in Denmark and one parent born abroad (Table 14 in Hjorth et al. 2025). The parents are found through mor_id and far_id in BEF. A parent’s opr_land does not give that parent’s birthplace: by the rules above, a parent born abroad to a Danish-born Danish citizen is of Danish origin and has Denmark.
Some codes are not current countries. DST lists former states such as the Soviet Union, which appear when a person is still recorded in CPR with that country, and areas such as Palestine (5157), Gaza (5223), the West Bank (5393) and East Jerusalem (5437). A number of codes were retired and folded into others, for example East Germany (5184) into Germany (5180) on 3 October 1990. Group through DST’s classification below rather than by hand, and check with anti_join() that every code in your data gets a group.
Western and non-Western, and other country groupings
DST publishes country codes in the classification Lande i personstatistik, v1:2021, valid from 1 January 2021. It has three groupings.
| Grouping | Groups |
|---|---|
| Vestlige/Ikke-vestlige lande (Western and non-Western countries) | Denmark, Western countries, non-Western countries, unknown |
| EU/EØS-lande (EU/EEA, the European Union and the European Economic Area, and countries outside it) | EU/EEA, outside the EU/EEA |
| World regions (the default hierarchy) | Europe, Africa, America, Asia, Oceania, stateless and unknown, with subgroups such as EU-27 without the United Kingdom |
DST’s classification lists the Western countries and gives no definition. They are the EU countries, the United Kingdom, Andorra, Iceland, Liechtenstein, Monaco, Norway, San Marino, Switzerland, the Vatican, Canada, the USA, Australia and New Zealand. Denmark, the Faroe Islands and Greenland form a group of their own. The United Kingdom is Western and not in the EU/EEA group, so the two groupings are not the same. In the EU/EEA grouping, Denmark, the Faroe Islands and Greenland sit inside the EU/EEA group, so set people of Danish origin apart with ie_type first if you compare EU/EEA with the rest.
DST has used the Western and non-Western grouping since 2002. In 2019 DST concluded that it is still usable for statistics (our translation) and kept it. One reason is that it is written into current legislation. DST describes the aim as groups that differ as much as possible from each other and are fairly uniform within, not groups by culture, and notes that Japan is non-Western. At the same time DST added the EU/EEA grouping, and 93.4 percent of Western immigrants and descendants fall in the EU/EEA group (Elmeskov, DST, 11 July 2019).
SEPLINE gives Western and non-Western as one possible split, lists world regions and EU/EEA against the rest as the alternatives from DST, and recommends the most detailed reporting the data allow. If you build your own regional grouping, define it in the methods.
Migration type and arrival
Which register holds the migration events, and how to use them to decide residence on an index date, are covered in Build your study population, Step 1 and in the VNDS section of Registers and variables.
For the reason for migration, the registers say little. The ground of residence in OPHG is registered from 1997 and can be used to identify refugees. Before 1997 there is a register at DST with mainly imputed values, which SEPLINE does not recommend for small study populations. Some studies approximate refugee status by country of origin and arrival in 1986 to 1992 (Hjorth et al. 2025, section on ethnicity). Length of stay can be calculated from the migration events or taken from opholdmd_dk in BEF from 1985.
Limitations
- Status can change. A descendant whose Danish-born parents both keep a foreign citizenship stays a descendant. If one of them becomes a Danish citizen, DST classifies the child as of Danish origin, and the country of origin changes with it. Decide the date at which you fix the status, and report it.
- Before 2008, one status per year. SEPLINE states that before 2008
ie_typeandopr_landare only available for people who lived in Denmark the whole calendar year. DST’s page for IE_TYPE describes the population as people with permanent residence in Denmark on 1 January of the year (our translation). Newly registered residents and people without a Danish CPR number, such as asylum seekers, are missing. After 2008 the information is quarterly. SEPLINE suggests using a nearby year if the index year is missing (Hjorth et al. 2025). - Event tables from the second quarter of 2019. In DST’s event tables, such as births, deaths and migrations,
ie_typeandopr_landare formed on the event date and not at the end of the quarter. - No history before arrival. Births, diagnoses and education abroad are not in the Danish registers. For education, see how missing education is handled. A sensitivity analysis restricted to people born in Denmark reduces the problem for your outcome, but it also removes the immigrants, who may be the group your question is about.
- Not a measure of ethnicity. The definitions depend on citizenship and birthplace, and they say nothing about how a person identifies. SEPLINE adds that these variables proxy many other circumstances and are often mediators of socioeconomic differences, not confounders.
- Emigration. People leave and return. Use the migration events to censor at emigration, see Attach date of death and emigration.
Count the groups in your cohort
Check by eye on your own data before you build on it. The sketch reads the most recent BEF snapshot up to the year before index, the same baseline year as the socioeconomic recipes, so the status is fixed before follow-up starts. It keeps unknown as its own category, as on the socioeconomic variables page, and keeps people with no BEF row in that period apart from DST’s own unknown.
library(dplyr) # select, collect, inner_join, filter, arrange, distinct, left_join, mutate, count
library(lubridate) # year
library(fastreg) # read_register
# BEF, lazily; lower-case column names
bef <- read_register("bef") %>%
rename_with(tolower)
# One row per cohort row: the newest BEF snapshot up to the year before index
# (year_baseline, as in the socioeconomic recipes). If your BEF holds several
# snapshots per year, keep the December one first, as under "Check your BEF"
# on the socioeconomic variables page.
origin <- bef %>%
select(pnr, year, ie_type, opr_land) %>%
# only the cohort's pnr, filtered in the database: BEF for the whole
# population over many years is too large to collect
semi_join(distinct(cohort, pnr), by = "pnr", copy = TRUE) %>%
collect() %>%
inner_join(
cohort %>% mutate(year_baseline = year(index_date) - 1) %>% select(row_id, pnr, year_baseline),
by = "pnr",
relationship = "many-to-many" # a pnr can have several snapshots AND several cohort rows
) %>%
filter(year <= year_baseline) %>%
arrange(row_id, desc(year)) %>%
distinct(row_id, .keep_all = TRUE) # newest snapshot per cohort row
cohort <- cohort %>%
left_join(select(origin, row_id, ie_type, opr_land), by = "row_id") %>%
mutate(
origin_group = case_when(
!row_id %in% origin$row_id ~ "Not in BEF", # no snapshot up to the baseline year
ie_type == 1 ~ "Danish origin",
ie_type == 2 ~ "Immigrant",
ie_type == 3 ~ "Descendant",
TRUE ~ "Missing" # DST's own unknown code, or no value
)
)
stopifnot(nrow(cohort) == n_distinct(cohort$row_id)) # nobody lost or duplicated
count(cohort, origin_group)To split into Western and non-Western, join opr_land to DST’s country classification above. Do not type the list of countries by hand.
See also
- Socioeconomic variables: SEPLINE and the education, employment and income recipes
- Build the study population: residence from BEF and VNDS
- Family links: link a person to the parents, for example to use the parents’ own country of origin
- Registers and variables: BEF and VNDS columns and codes
- DST, IE_TYPE and OPR_LAND: the variable pages