Results
We analyzed data from 8,720 pregnant participants, among whom 1,775 (20.4%) experienced miscarriage during the 12-month study period. Miscarriages were reported as early as 3 gestational weeks (median=6; interquartile range: 5–8 gestational weeks). We observed 567 late miscarriages (32% occurring ≥8 gestational weeks). The distribution of gestational weeks at miscarriage is presented in Table S2 . Mean age was 30 years for female participants and 32 years for male partners. Mean BMI of female participants was 27 kg/m 2 and 28 kg/m 2 for male partners. Approximately one quarter of couples resided in the Northeast US, while 22% resided in the South, 22% in the Midwest, 16% in the West, and 16% in Canada. Approximately one quarter of participants had a previous miscarriage, 35% had had an unplanned pregnancy before enrolling in PRESTO, and about half were parous. Almost 14% of female participants reported any history of subfertility or infertility, and 7% of study pregnancies were conceived via fertility treatment.
After statistical feature selection, 17 variables remained in the dataset. The variables selected into the full survival model are presented in Table S3 . The variables selected into the sparse survival model are presented in Table 2 . The strongest two predictors in the sparse survival model were female age at conception (HR=1.19; 95% CI: 1.11, 1.27) and history of miscarriage (HR=1.10; 95% CI: 1.03, 1.17), which were both positively associated with miscarriage ( Table 2 ). All other variables selected into the sparse model had very small or null associations with miscarriage. Variables that were very slightly positively associated with miscarriage were use of omega-3 or fish oil supplements (HR=1.04; 95% CI: 0.99, 1.10), number of prior pregnancies (HR=1.04; 95% CI: 0.99, 1.10), history of subfertility or infertility (HR=1.04; 95% CI: 0.97, 1.11), male partner age at conception (HR=1.03; 95% CI: 0.97, 1.10), and having a history of unplanned pregnancy (HR=1.01; 95% CI: 0.94, 1.09). Variables that were very slightly inversely associated with miscarriage included having been pregnant before (HR=0.95; 95% CI: 0.87, 1.05) and being vaccinated against human papillomavirus (HPV) (HR=0.98; 95% CI: 0.93, 1.04). The concordance index of the final sparse survival model, applied to the testing dataset, was 55.4%, indicating poor-to-moderate discrimination ( i.e. , ability of the model to discriminate between individuals with and without miscarriage).
When we restricted the incident period to ≥8 gestational weeks (n=6,993; 32% of all miscarriages), 4 variables remained after statistical feature selection. The strongest predictors of miscarriage were female age at conception, male partner age at conception, and history of unplanned pregnancy, each of which was positively associated with miscarriage ( Table S4 ). The Healthy Eating Index-2010 score was also selected into this model and was inversely associated with miscarriage. The concordance index for this model was 55.6%.
When we restricted to primigravid participants (n=4,267), 9 variables remained after statistical feature selection. In this model, variables that were positively associated with miscarriage included female age at conception, male age at conception, use of omega-3 or fish oil supplements, recent use of psychotropic medications, and female BMI; variables that were inversely associated with miscarriage included being married, use of oral contraceptives as the most recent contraceptive method, residence in the Northeast US, and the Healthy Eating Index-2010 score ( Table S5 ). The concordance index for this model was 57.4%. Among primigravid participants who contributed ≥8 gestational weeks to the analysis (n=3,488), only female and male partner age remained after statistical feature selection, and the concordance index was 53.3% ( Table S6 ).
Variables selected into the full static models are presented in Table S3 . After recursive feature elimination, there were 9 variables in the sparse model ( Table 3 ). Performance metrics for all static models are presented in Table 4 . The weighted-F1 score ranged from 72.6% for the LR-L1 model to 73.5% for the RF model. The two most important variables selected into the sparse static model were female age at conception and history of miscarriage, which were both positively associated with miscarriage.
When we restricted the incident period to ≥8 gestational weeks (6,993 pregnancies), 4 features remained after statistical feature selection, and 2 remained after recursive feature elimination ( Table S7 ). Female and male age at conception were the final two variables selected into the sparse model, with a weighted-F1 score of 88.0%. Among primigravid participants (n=4,267), 9 features remained after statistical feature selection, and all of these remained after recursive feature elimination. The weighted-F1 score of the sparse model was 73.8%, and the two most important variables selected into the model were residing in the Northeast US (negatively associated with miscarriage) and female age at conception (positively associated with miscarriage) ( Table S8 ). Among primigravid participants with pregnancies lasting ≥8 gestational weeks (n=3,488), 2 features remained after statistical feature selection and only 1 remained in the final sparse model: male age at conception ( Table S9 ). The weighted-F1 score for this model was 88.5%.
Materials
Pregnancy Study Online (PRESTO) is an ongoing web-based preconception cohort study that collects data on a variety of environmental and behavioral factors in addition to pregnancy outcomes ( 26 ). At enrollment, eligible participants were female, aged 21–45 years, residents of the United States (US) or Canada, and trying to conceive without the use of fertility treatment. Participants were followed for up to 12 months of pregnancy attempts, during which time they could have initiated fertility treatment. Participants who conceived were followed through pregnancy and postpartum.
During 2013 through 2022, 16,631 female participants enrolled in PRESTO and completed a baseline questionnaire. We excluded 37 participants who were not from the US or Canada, 120 who were already pregnant at study entry, 203 who completed the baseline questionnaire 2 months after the screening questionnaire. Approximately 36% of participants were lost to follow-up. Among those who were lost to follow-up, we successfully collected information on pregnancy for 25% of participants via email or phone contact, or by searching for baby registries and birth announcements online; for 5% by linking to birth registries in selected states (CA, FL, MA, MI, NY, OH, PA, TX); and for 5% by linking to FertilityFriend.com data (a mobile computing fertility-tracking app).
In total, 8,739 participants became pregnant during follow-up (we included only the first observed pregnancy per participant in these analyses). We excluded 19 participants with missing data on categorical variables (handling of missing data is described in the Supplementary Material ), retaining a total of 8,720 participants in the dataset used for our analysis. The institutional review board at Boston University Medical Campus approved the study protocol.
Female participants completed a baseline questionnaire and follow-up questionnaires every eight weeks until pregnancy. Those who conceived completed an early pregnancy questionnaire at a median of 9 weeks’ gestation and a late pregnancy questionnaire at approximately 32 weeks’ gestation. On baseline, follow-up, and pregnancy questionnaires, we collected data on pregnancy status, sociodemographic factors, lifestyle and behavioral factors, anthropometrics, medical and reproductive history, and selected male partner characteristics. Reproductive history included gravidity, parity, and history of miscarriage (i.e., miscarriages that occurred prior to enrolling in PRESTO), among other variables. Participants were also invited to complete the web-based Diet History Questionnaire (DHQ II: 2013–2019; DHQ III: 2020–2022) ten days after enrollment. The DHQ was designed by the National Cancer Institute and the first version of the DHQ was validated against 24-hour dietary recalls in a US population ( 27 , 28 ). We used DHQ data to calculate the Healthy Eating Index-2010 (HEI-2010) score, a measure of diet quality ( 29 ). For time-varying characteristics, we prioritized data collected most recently before conception to avoid bias due to conditioning on future information ( 30 ). Table 1 provides a complete list of the 160 variables included in this analysis and when they were ascertained. Ninety variables were binary, 58 were continuous, and 12 were categorical. Table S1 describes the percentage of missingness for each predictor variable and the Methods Supplement provides an overview of how missing data were handled.
We defined miscarriage as pregnancy loss before 20 completed weeks of gestation (including blighted ovum and chemical pregnancy but excluding ectopic pregnancy and induced abortion). On follow-up questionnaires, participants reported the date of their last menstrual period, whether they were currently pregnant, and whether they had experienced a miscarriage since completing their previous questionnaire. Participants who reported a miscarriage were asked how many weeks the pregnancy lasted and on what date the pregnancy ended. Pregnant participants reported the due date of their current pregnancy and the date of their first positive pregnancy test. Pregnant participants were asked to report the method(s) used to confirm their pregnancy ( e.g. , home pregnancy test, urine or blood test in doctor’s office, ultrasound). More than 95% of participants reported using a home pregnancy test to identify their pregnancy.
For participants who reported a miscarriage, we used the participant’s reported gestational weeks at loss when available (defined as weeks since the last menstrual period). Among participants who did not report their gestational week at loss but who reported a due date (11%), we estimated gestational age as: (pregnancy end date – (pregnancy due date – 280 days))/7 ( 31 ). Among participants who reported neither their gestational week at loss nor their due date (21%), we estimated week at loss as: (pregnancy end date – last menstrual period date)/7. Approximately 97% of miscarriages were identified via study questionnaires; the remaining 3% were identified via the study withdrawal form, via email or phone contact, by linking to birth registries, or by linking to FertilityFriend.com data.
We used supervised machine learning methods to generate predictive models of miscarriage. We generated both static and survival models. Static models predict the risk or odds of miscarriage without consideration of time at loss, while survival models predict the rate of miscarriage (conceptualized as time to miscarriage). For all analyses, we first performed several pre-processing steps including statistical feature selection. For static models, we used a variety of supervised classification methods including linear ( e.g. , logistic regression) and non-linear ( e.g. , Gradient Boosted Trees) algorithms. For survival models, we fit Cox proportional hazards models. For both static and survival models, we generated full and sparse models. The full models contain all variables selected by statistical feature selection, whereas the sparse models contain all variables selected by both statistical feature selection and univariate feature selection for survival models or recursive feature elimination for static models. We evaluated model performance via the area under the receiver operating characteristic curve (AUC), precision and recall metrics, and the weighted-F1 score for static models, and via the concordance index for survival models. These methods are described in greater detail in the Supplementary Material .
We repeated all analyses among primigravid participants to generate models predictive of primary miscarriage, which may have different predictors from secondary or recurrent miscarriage. We also restricted the dataset to ≥8 gestational weeks to assess the extent to which predictors differed for later losses, which are less likely to be attributable to random chromosomal aberrations ( 32 ). All analyses were performed with Python packages, which have been made publicly available. 1
Discussion
In this prospective cohort study of North American pregnancy planners, we developed predictive models for miscarriage based on self-reported preconception data. Previous studies have identified few confirmed causes of miscarriage, and the strongest identified risk factors in these studies were age and history of miscarriage ( 2 ). In the present study, we generated models with moderate predictive power: the weighted-F1 score ranged from 73–89% for static models and the concordance index ranged from 53–56% for survival models. However, the AUC was <60% for all static models. Consistent with previous studies, our findings indicate that advancing female and male partner age are the most important predictors of miscarriage, and that female age is generally more predictive than male age. After age, history of miscarriage appeared to be the strongest predictor of miscarriage. These factors were consistently predictive of miscarriage across a variety of models and settings.
Our study identified several preconception dietary factors as predictors of miscarriage, albeit most associations were very small and consistent with the null. Specifically, a healthier diet as measured by the Healthy Eating Index-2010 score ( e.g. , greater intake of fruits and vegetables, whole grains, dairy, seafood & plant proteins, and unsaturated fats) was associated with a slightly lower rate of miscarriage. In addition, use of omega-3 or fish oil supplements was associated with a slightly increased rate of miscarriage and several B-vitamins were selected with inconsistent associations. Several studies have investigated the relation between dietary factors and miscarriage ( 33 – 39 ). One study – with a similar design to PRESTO – reported an inverse association between adherence to Nordic dietary guidelines (which emphasize fish consumption) and risk of miscarriage ( 35 ). Another study evaluated the association between pre-pregnancy adherence to three dietary patterns – the Healthy Eating Index 2010, the Alternative Mediterranean Diet, and the Fertility Diet (FD) – and risk of miscarriage among 15,950 pregnancies in the Nurses’ Health Study II ( 34 ). The authors reported no association between these dietary patterns and miscarriage. The role of dietary factors remains debated, and the predictive ability of these variables in our study was small.
An unexpected finding in our study was the selection of smoking status into the sparse static model and the full survival model in the full study population (i.e., not restricted by gravidity or gestational week). However, the overall prevalence of smoking was quite low in this study population (4%), and this variable was not consistently selected into all models. Moreover, the detrimental health effects of smoking tobacco are well documented, and several studies have identified a positive association between current smoking and miscarriage risk ( 13 , 14 ).
The following variables were selected into models developed among primigravid participants but not among those who were previously pregnant: marital status, pregravid use of oral contraceptives, recent use of psychotropic medications, and female BMI. Being married was associated with a lower rate of miscarriage, which could be related to higher socioeconomic position, greater social and emotional support, and lower stress levels. However, factors such as perceived stress scores and household income were not selected as important predictors of miscarriage during the statistical feature selection process. Some ( 40 – 42 ) but not all ( 43 , 44 ) studies reported that pregravid use of oral contraceptives was associated with a lower risk of miscarriage compared with non-use, in agreement with the present study. However, a recently published paper conducted in PRESTO reported that pregravid use of oral contraceptives was not associated with miscarriage ( 45 ). This contrast may be due to differences in model selection, as the previous publication aimed to estimate potential causal effects of contraceptive use. The potential association between use of psychotropic medications and miscarriage has been debated. However, a recent study reported that use of antidepressants was not associated with miscarriage after controlling for depression diagnosis ( 46 ). High BMI has previously been associated with an increased risk of miscarriage ( 3 , 4 ). Among 5,132 couples who conceived in a Danish preconception cohort study, the adjusted HR for miscarriage among women with BMI ≥30 kg/m 2 relative to those with BMI 20–24 kg/m 2 was 1.23 (95% CI: 0.98, 1.54) ( 4 ).
We attempted to isolate predictors of later miscarriage, as earlier miscarriages (<8 weeks’ gestation) are more likely to be due to chromosomal abnormalities than later losses ( 47 ). However, the predictive ability of models restricted to ≥8 gestational weeks was no better than those generated in the entire dataset, and the list of variables selected for these models was similar to those based on full spectrum of gestational ages (all miscarriages).
Previous studies have developed models to predict miscarriage in special populations, such as couples with recurrent miscarriage ( 18 – 21 ) or those using ART ( 15 – 17 ). These studies largely relied upon ultrasound measurements (e.g., gestational sac size, crown-rump length, fetal heart rate) or laboratory values (e.g., beta-human chorionic gonadotropin, progesterone levels) during early pregnancy. One study in the Netherlands attempted to predict pregnancy outcome among 526 couples with unexplained recurrent miscarriage ( 21 ). Data on previous miscarriages and fertility treatment; and male and female age, BMI, and smoking status were included, and all were identified as potential predictors of miscarriage, with an AUC of 0.66. The present study greatly expands on the breadth of potential predictors assessed. Moreover, our findings might be useful for couples who wish to understand their risk for miscarriage before trying to conceive spontaneously.
Study limitations include bias due to missingness or misclassification of predictor variables. All data were self-reported, and certain variables such as dietary factors or medication use may be more vulnerable to misclassification than others. The impact of misclassification on our findings is challenging to quantify, as there is little research on the impact of measurement error on machine learning prediction models ( 48 , 49 ). Outcome misclassification is also possible but unlikely: more than 95% of participants reported using at-home-pregnancy tests and we ascertained miscarriages as early as 3 weeks’ gestation. In addition, although we evaluated a wide range of variables, we were unable to include environmental exposures (e.g., phthalates, phenols, pesticides, etc.) as potential predictors. Moreover, we did not evaluate interactions between the independent variables, such as depressive symptoms and use of psychotropic medications. Finally, though we validated the models using split-sample replication techniques, we were unable to conduct an external validation study. Given that more than 93% of PRESTO participants had spontaneous conceptions, our results may not generalize to ART-conceived conceptions.
Conclusions
In this study, we used a variety of supervised machine learning methods to generate predictive models of miscarriage based on self-reported preconception data. We considered 160 potential predictors of miscarriage and analyzed data from nearly 9,000 pregnancies. Female age, male age, and history of miscarriage were the most important predictors of miscarriage, consistent with existing knowledge. The overall performance of our models was moderate. Our findings suggest that miscarriage is not easily predicted based on preconception lifestyle characteristics, including reproductive and medical factors.
Introduction
Miscarriage, or pregnancy loss before 20 completed weeks of gestation, affects approximately 20% of recognized pregnancies ( 1 ). The strongest identified predictors of miscarriage are older parental age and history of miscarriage ( 2 ). Other reported risk factors include low and high body mass index (BMI) ( 3 , 4 ), caffeine consumption ( 5 – 7 ), alcohol intake ( 8 – 11 ), and smoking ( 12 – 14 ), though the etiology of miscarriage remains poorly understood.
Several studies have developed predictive models of miscarriage among individuals receiving treatment with assisted reproduction technology (ART) ( 15 – 17 ), individuals with recurrent miscarriage ( 18 – 21 ), and individuals with threatened miscarriage ( 22 ). Most of these studies have relied on clinical assessments such as early pregnancy ultrasound measurements and laboratory values. Other studies have attempted to predict miscarriage based on early pregnancy characteristics ( e.g. , parental age, ultrasound measurements, and laboratory values) in general populations ( 23 , 24 ). However, no study has derived a predictive model of miscarriage using prospectively collected data on the couple during the preconception period. Predicting primary (i.e., first-time) miscarriage is of great importance, given the high rate of miscarriage and the impact of miscarriage on mental health and fertility outcomes. Moreover, primary miscarriage likely shares many risk factors with recurrent miscarriage ( 25 ).
In a North American prospective preconception cohort study, we predicted risk of miscarriage using 160 self-reported variables describing a variety of preconception sociodemographic, lifestyle, dietary, and anthropometric factors. We used supervised machine learning methods with several classification algorithms and variable selection procedures.
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.