Pregnancy and birth variables
Gestational age, birth size, parity and multiple births from the Medical Birth Register
Use this page when a pregnancy or birth variable is your exposure, outcome or covariate. It covers three groups of variables from the Medical Birth Register (MFR): gestational age and size at birth, parity, and multiple births. For each it says which column to use, where the register is weak, and what to write in your methods.
The columns of each MFR table are in Registers and variables, and this page does not repeat them. The table below spells the names as DST (Statistics Denmark) does. The code uses lower case, as after rename_with(tolower). Check the names in your own delivery with colnames().
Which table holds what
The MFR has three eras (1973-1996, 1997-2018 and 2019 onwards), and the variable names differ between them. DST has no MFR table for the first era (see Family links), so the table below shows the other two (Bliddal et al. 2018; Danish Health Data Authority (Sundhedsdatastyrelsen, SDS), register page).
| Variable | 1997-2018 (mfr) |
2019 onwards (mfr_nyfoedte) |
|---|---|---|
| Gestational age | gestationsalder_dage (days) |
Gestationsalder (days), GestationsalderUger (full weeks) |
| Birth weight (g) | vaegt_barn |
Vaegt_Barn |
| Parity | paritet |
Paritet |
| Multiple births | flerfoldsfoedsel_beregnet, barnsnummer_flerfoldsfoedsel (child’s number) |
AntalBoernIFoedslen (children in the birth), BarnsNummerIFoedslen (child’s number) |
| Birth serial number | foedselsloebenummer |
DW_EK_Foedsel (birth event key) |
Stillbirths from 1997 to 2018 are in a separate dataset, mfrdfoed, with gestational age in gestationsalder_uger and gestationsalder_dage_efter_uger (full weeks and the days after them), not in total days (SDS, documentation 1997-2018, tables Doedsfoedsler_blanket and Hjemmefoedsler_blanket). The 2019 table holds live births and stillbirths together.
Both gestational age columns are in days, so divide by 7 for weeks. SDS gives the example 283 days for 40 weeks and 3 days (SDS, documentation from 2019).
Before 1997 DST has no MFR table, and its fertility datasets (ftbarn, ftforael) do not hold gestational age. See the pre-1997 period.
Two things change in 2019.
- The population. Up to 2018 the register holds births in Denmark to mothers with a Danish CPR (the Civil Registration System) number. From 2019 it holds births in Denmark whether or not the mother has one, so a study that crosses 2019 compares two populations (Family links).
- Missing values. In the 2019 table numeric fields such as
Vaegt_BarnandParitetuse -1 for “not stated”, notNA. Recode -1 toNAbefore you compute anything, or a mean is pulled down (the Nyfoedte section lists the fields).
Gestational age and preterm birth
Missing values and cleaning
Gestational age is missing for 8% of births in 1997 and 1% from 2001. SDS does not clean the register after entry, so unrealistic gestational ages and birth weights stay in the data (Bliddal et al. 2018). Look at the distribution before you categorise, and decide on a rule for implausible values that you can describe in the methods.
Preterm categories
WHO (World Health Organization) defines preterm birth as a birth before 37 completed weeks and divides it into three groups (WHO fact sheet on preterm birth).
| Group | Completed weeks |
|---|---|
| Extremely preterm | Below 28 |
| Very preterm | 28 to below 32 |
| Moderate to late preterm | 32 to below 37 |
Report the groups, not only the composite, when your question is about causes or outcomes that differ along the range. In days the cut points are 196, 224 and 259.
library(fastreg) # read_register()
library(dplyr) # mutate, case_when
# The 1997-2018 table; from 2019 it is mfr_nyfoedte, with other column names
# (see the table at the top of this page)
births <- read_register("mfr") %>%
rename_with(tolower) %>%
select(cpr_barn, cpr_moder, foedselsdato, koen_barn, gestationsalder_dage, vaegt_barn, paritet) %>%
collect()
births <- births %>%
mutate(
ga_weeks = floor(gestationsalder_dage / 7), # completed weeks
ga_group = case_when(
is.na(ga_weeks) ~ NA_character_,
ga_weeks < 28 ~ "extremely preterm",
ga_weeks < 32 ~ "very preterm",
ga_weeks < 37 ~ "moderate to late preterm",
TRUE ~ "term or later"
)
)
count(births, ga_group) # missing values show up as their own rowStillbirth definition changed in 2004
Until 31 March 2004 a stillbirth was a dead fetus delivered after 28 completed weeks. From 1 April 2004 it is a dead fetus delivered after 22 completed weeks. Stillbirths between 22 and 28 weeks before April 2004 are in the National Patient Register but not in the MFR (Bliddal et al. 2018). A study of stillbirth or extreme prematurity that crosses 2004 needs to take this into account.
DST’s MFR tables start in 1997, so this only matters if you have older births from SDS. Before 1978 gestational age was coded in the variable fuldb, with 0 for 40 weeks or more and 1 to 8 for increasing prematurity. For 1974 to 1977, 89.6% of children were coded 0, against 70.0% in the later years, so the groups are too coarse to use as weeks. Gestational age in completed weeks (svlengde) is used from 1978 (á Rogvi et al. 2011). The same paper found that small for gestational age (SGA) in the early years was classified with 49% false positives, mainly because of these intervals. A cut-off of 3 standard deviations below the mean brought the false positives down to 9%, at the cost of more false negatives. The authors note that data from before 1981 are most often left out. A sensitivity analysis that starts later is a simple way to check how much the early years matter.
Small and large for gestational age
SGA and LGA compare birth weight with a reference for the same gestational age and sex. The usual rule is a birth weight below the 10th percentile for SGA and above the 90th for LGA. Some studies use the 3rd percentile for severe SGA. The register does not hold a ready-made SGA variable, so you need a reference and a rule, and you need to report both.
The reference decides who is classified. Three are in common use.
Marsál (1996). Curves built from ultrasound estimates of fetal weight in 86 uncomplicated pregnancies at four Scandinavian centres, because curves built from birth weights underestimate growth in the preterm period. The standard deviation is set to 12% of the mean weight, and SGA is below the mean minus 2 standard deviations. That is a different rule from the 10th percentile and classifies a different share of births. Boys weigh 2 to 3% more than girls on average (Marsál et al. 1996). á Rogvi et al. 2011 used these curves to define SGA among births in the MFR for 1974 to 1996.
INTERGROWTH-21st. An international standard for newborn size from healthy pregnancies in eight populations, with centiles by gestational age and sex (Villar et al. 2014). In 15 European countries, SGA and LGA prevalence was near 10% with each country’s own charts. With INTERGROWTH-21st it ranged from 3.0% to 10.1% for SGA and from 8.0% to 24.9% for LGA, along a north to south gradient. Infants who were reclassified from SGA to normal growth by the international chart still had a higher perinatal mortality than other normally grown infants (odds ratio 2.7) (Hocquette et al. 2021). The authors conclude that an international chart can classify growth-restricted infants as normally grown. The paper includes births from 33 weeks.
Customised references. These adjust the expected weight for maternal height, weight, parity and ethnic group (Gardosi et al. 1992). They need those inputs. In the MFR, maternal weight, height and BMI (body mass index) exist from 2003 (see bmi_moder, hoejde_moder, vaegt_moder in the column table), so a customised reference is only possible for later births.
For very preterm infants the choice of chart changes the SGA prevalence, and the chart should be chosen for that age range. Report the chart you used and repeat the analysis with a second one.
Once you have chosen a chart, copy its cut-off weights into a small table, ref, with one row per sex and completed week, and join it onto the births. The sketch uses ga_weeks from the preterm code above. In the 2019 table, recode -1 in the birth weight to NA first (Which table holds what).
library(dplyr) # left_join, mutate, case_when, count
# ref: one row per sex and completed week, from the chart you chose
# koen_barn | ga_weeks | p10 | p90 (p10 and p90 are weights in grams)
# koen_barn must be coded the same way in ref as in births: check with count()
births <- births %>%
left_join(ref, by = c("koen_barn", "ga_weeks")) %>% # adds p10 and p90 to each birth
mutate(
size_for_ga = case_when(
is.na(vaegt_barn) | is.na(p10) ~ NA_character_, # no weight, or a week the chart does not cover
vaegt_barn < p10 ~ "SGA", # below the 10th percentile
vaegt_barn > p90 ~ "LGA", # above the 90th percentile
TRUE ~ "AGA" # appropriate for gestational age
)
)
count(births, size_for_ga) # missing values show up as their own rowWhat to report
- Which gestational age variable you used and what you did with missing and implausible values.
- The preterm cut points, and whether you analysed the three groups or one composite.
- The growth reference, the rule (percentile or standard deviation) and the cut-offs for SGA and LGA.
- Whether the analysis is limited to singletons.
- A sensitivity analysis with a second reference, and one that starts after the early years if your study covers them.
Parity
What the MFR variable means
SDS defines paritet as the number of completed pregnancies including stillbirths at the end of the current delivery, so 1 is a first birth (SDS, documentation 1997-2018). The 2019 documentation uses the same wording, with -1 for not stated. It counts deliveries, not children, so a twin delivery adds one. The variable is not gravidity: miscarriages and induced abortions are not part of it.
The midwife records the number of previous live births on the notification form for the register. A comparison with the parity calculated in DST’s fertility database found that more than 99.5% of women with parity one, who had given birth from 1978, were classified as such by both (Knudsen 1993, abstract in English). That is the evidence for first births only. It does not cover higher parity.
Parity is missing for 1 to 3% of births in the years Bliddal et al. tabulate (Bliddal et al. 2018, Table 5).
From 2019, SDS takes parity from the birth report. If it is missing, or lower than the number of births the mother has in the MFR, SDS replaces it with the number of births in the MFR, and the documentation says that only births from 2005 onwards are included in that count (SDS, documentation from 2019). Check the minimum value in your own file before you use the column.
ftforael, ftbarn)
DST’s fertility datasets hold their own parity columns. medicinsk_paritet in ftforael is the child’s birth number for the mother. Stillbirths count and a multiple birth counts as one. DST adds that children not known in the registers are not counted, such as children born abroad who never received a CPR number, and children born before 1960 (DST, MEDICINSK_PARITET). DST gives no definition of the other parity columns beyond a short label, see the column table. paritet in ftforael is “the mother’s delivery number as stated in the MFR” (DST, PARITET).
If you count parity from ftbarn, keep presumed biological mothers first: codes 21 to 23 of mor_foed_adop (DST, MOR_FOED_ADOP). Children born 2019 to 2023 are the exception: DST’s corrected version sets the column to 99 (unknown) for them, so that filter drops every child born in those years (the warning in Family links). Keep code 99 for those years, or take the mother from the MFR, and report which you did. What the codes mean, and what they cannot tell you, is under Adoption in Family links.
Deriving parity from successive births
You can count the mother’s earlier deliveries yourself, to check paritet or when it is missing. The MFR has one row per child, so a twin delivery gives two rows. The code below treats births to the same mother less than 30 days apart as one delivery, the rule DST uses for flerfold for births registered in the MFR (Multiple births), so twins born either side of midnight, or days apart, stay together. It also gives each delivery an id, delivery_id, which the multiple-births code uses.
In the 2019 table DW_EK_Foedsel is the key of the birth event, shared by the children of one delivery (the Nyfoedte section). In the 1997-2018 table SDS describes foedselsloebenummer only as the birth serial number, so check with count() whether twins share a value before you rely on it.
library(dplyr) # count, filter, arrange, group_by, mutate, ungroup, select, na_if
# births = your mfr table, collected, lower-case column names, one row per child
births <- births %>%
mutate(
cpr_moder = na_if(cpr_moder, ""), # after conversion from SAS a missing id can be "" instead of NA
foedselsdato = as.Date(foedselsdato) # a date: on a datetime, diff() below would count hours
)
# A row without the mother's number or the birth date cannot be placed in a
# delivery. Count them, so you can report how many you leave out
count(births, no_mother_or_date = is.na(cpr_moder) | is.na(foedselsdato))
births <- births %>%
filter(!is.na(cpr_moder), !is.na(foedselsdato)) %>% # one NA would make every later count NA
arrange(cpr_moder, foedselsdato) %>% # each mother's children in date order
group_by(cpr_moder) %>%
mutate(
# TRUE for the first child of a delivery: the mother's first child in the
# table, or a child born 30 days or more after her previous child
new_delivery = c(TRUE, diff(foedselsdato) >= 30),
# running count of her deliveries: 1 = her first delivery in the table
parity_derived = cumsum(new_delivery)
) %>%
ungroup() %>%
# one id per delivery, shared by twins: the mother plus her delivery number
mutate(delivery_id = paste(cpr_moder, parity_derived))
# one row per delivery (its first child), for the time-varying code below
deliveries <- births %>%
filter(new_delivery) %>%
select(cpr_moder, foedselsdato, parity_derived)The count only sees deliveries that are in your table. A table that starts in 1997 undercounts parity for women who gave birth earlier. Compare the derived value with paritet: derived values below the recorded ones are expected for women with earlier births outside your table.
Parity that changes during follow-up
If you follow women across several pregnancies, parity changes at each delivery, and a baseline value is wrong after the next one. Build start/stop rows with tmerge() as in Time-varying variables, with each delivery as a measurement. The table you hand to tmerge() needs the delivery day on the same scale as follow-up, and the parity after the delivery.
library(dplyr) # left_join, mutate, transmute
# index_dates: cpr_moder, index_date (start of follow-up for each woman)
measurements <- deliveries %>%
left_join(index_dates, by = "cpr_moder") %>%
transmute(
pnr = cpr_moder,
day = as.numeric(foedselsdato - index_date),
value = parity_derived
)
# a negative day sets the value at the start of follow-up; see the time-varying pageWomen who gave birth abroad
The MFR does not include births that took place abroad (Bliddal et al. 2018). A woman who immigrated after earlier births has a first MFR birth that looks like a first birth when you derive parity from the table. In the Norwegian register, migrant women whose first birth was before arrival had higher odds of preterm birth, stillbirth and low Apgar score in later births than migrant women whose first birth was in Norway, so the group is not a random subset (Vik et al. 2020). The sources on this page do not say whether the recorded paritet counts births abroad, so do not assume that it does.
Options, depending on your question:
- Stratify or restrict by origin, for example women of Danish origin.
ie_typeandopr_landin BEF (the population register) give immigrant status and country of origin, see Immigrants and descendants. - Run the analysis without immigrant women as a sensitivity analysis.
- State the limitation in the methods and give the share of immigrant women in the study population.
What to report
- Whether parity is the recorded
paritetor derived, and which table and years it was derived from. - Whether it is fixed at baseline or time-varying.
- How women with earlier births abroad were handled, and how many there are.
Multiple births
How they appear in the MFR
A multiple birth is a delivery of more than one child. The register unit is the child, live-born or stillborn (SDS, register declaration, section 1.2), so a twin delivery gives two rows. Bliddal et al. count 1,249 multiple deliveries among 66,917 in 1997 and 1,064 among 61,687 in 2016, about 2% in each of the years they list (Bliddal et al. 2018, Table 3). The table has more infants than deliveries for the same reason.
You can identify them in three ways. Use the column names as your delivery spells them.
| Source | Column | Note |
|---|---|---|
| Number of children | AntalBoernIFoedslen (2019 onwards) |
Number of children in the birth: 1, 2, 3 (SDS, documentation from 2019). For 1997-2018, count the rows per mother and birth date. |
| Child’s order | flerfoldsfoedsel_beregnet, barnsnummer_flerfoldsfoedsel (1997-2018), BarnsNummerIFoedslen (2019 onwards) |
The child’s number within the birth (SDS, documentation 1997-2018). |
| Diagnosis | flerfoldsgraviditet |
An ICD-10 code. O30 is multiple gestation: O30.0 twin, O30.1 triplet, O30.2 quadruplet, O30.8 other, O30.9 unspecified (WHO ICD-10). Check how the code is written in your delivery with count(). |
Use two of them and check that they agree. In the fertility data, flerfold in ftbarn is 1 single, 2 twin, 3 triplet and 4 quadruplet. DST derives it from the MFR and CPR. Children are grouped as a multiple birth if they have the same mother and birth dates at most one day apart, and for births registered in the MFR if their birth dates are less than 30 days apart (DST, FLERFOLD).
Multiple birth as mediator, confounder or collider
What to do with multiple births depends on the question, so draw the causal diagram first. In a study of assisted reproduction and preterm birth, plurality lies on the path from exposure to outcome, and adjusting for it blocks part of the effect. In a study of maternal age, plurality can be a confounder. When plurality and the outcome share a cause that is not measured, conditioning on it can open a path that was closed, which is collider bias. These are examples, not a rule for your study.
Restricting to singletons, analysing at the pregnancy level and analysing at the infant level answer different questions and give different estimands (Brown et al. 2025). Choose the one that matches the question and say why.
Approaches
- Restrict to singletons. Common for birth weight, fetal growth and preterm birth, where the process differs in multiples. It conditions on plurality, so it changes the question if plurality is on the causal path.
- Pregnancy level. One row per delivery, with the outcome set to 1 if any child had it. Fits questions about the pregnancy.
- Infant level with clustering. All children, with the dependence between children of the same delivery taken into account.
For a binary outcome at the infant level, a simulation study with preterm infants found that generalised estimating equations (GEE) gave the best balance between standard error and parameter estimate at any share of twins. A logistic random-intercept model could not estimate the correlation between siblings when twins were few, and gave results like ordinary logistic regression. Ordinary logistic regression underestimated all parameters when twins were present (Sauzet & Peacock 2017).
The sketch needs delivery_id, which the parity code above gives each delivery. In the 2019 table dw_ek_foedsel can be used instead.
library(dplyr) # mutate, arrange
library(geepack) # geeglm()
# births: one row per child, with delivery_id from the parity code above
births <- births %>%
mutate(delivery_id = factor(delivery_id)) %>% # a character id is read as ONE cluster, without an error
arrange(delivery_id) # geeglm wants the rows of a cluster next to each other
fit <- geeglm(preterm ~ exposure + parity_cat, # preterm 0/1, your exposure and covariates
id = delivery_id, # children of the same delivery form a cluster
family = binomial,
corstr = "exchangeable", # the same correlation between any two children of a delivery
data = births)
summary(fit)If twins are the subject of the study, the Danish Twin Registry holds twins from birth cohorts to 2009, linked to the national registers at Statistics Denmark (Pedersen et al. 2019). A review of 32 twin studies of early-life exposures describes conditional (within-pair) methods, which adjust by design for shared confounders, and marginal methods such as GEE, which treat pairs as clusters and which the authors say may lead to invalid inference (Fasola et al. 2021).
Multiples and parity together
A twin delivery adds one to parity, not two. When you count deliveries from the MFR, group the children of one delivery before you count, as in the derivation above.
What to report
- The approach (singletons only, pregnancy level or infant level) and why.
- The variable or code used to identify multiple births.
- The method used to account for clustering, if you kept all children.
- The share of multiple births in the study population.
See also
- Registers and variables: the MFR columns and tables
- Family links: the mother and father of a child, adoption and siblings
- Immigrants and descendants: origin, for women whose earlier births were abroad
- Time-varying variables: start/stop data for parity
- Missing data: for missing gestational age and parity
- Bliddal et al. 2018: the register profile
- Next: Assemble and prepare the dataset, where you join the variables onto the cohort