| School or College | School of Medicine |
| Department | Public Health Division |
| Project type | Master of Statistics (MSTAT): Biostatistics Project |
| Author | Otto, Seth; Stanford, Joseph; Wang, Jing; Hung, Man |
| Title | Survival analysis of live birth and pregnancy according to the iNEST study cohort |
| Description | Subfertility is generally defined as the inability to conceive after 12 or more months of unprotected intercourse. For women aged 35 and above, this definition is shortened to 6 months. Approximately 1 in 7 couples struggle with subfertility in developed countries.1 Standard treatments for subfertility, such as in vitro fertilization and intrauterine insemination are often costly and invasive. An alternative approach for treating subfertility is natural procreative technology (NPT), which aims to correct underlying causes of subfertility to facilitate natural conception and pregnancy through intercourse. |
| Type | Text |
| Publisher | University of Utah |
| Subject | Survival analysis; pregnancy live birth; infertility subfertility; laparoscopy; natural procreative technology |
| Language | eng |
| Rights Management | © Seth Otto, Joseph Stanford, Jing Wang, Man Hung |
| Format Medium | application/pdf |
| ARK | ark:/87278/s6pcdrnx |
| Setname | ir_dph |
| ID | 2483667 |
| OCR Text | Show SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT MSTAT Project Report Seth Otto Introduction Subfertility is generally defined as the inability to conceive after 12 or more months of unprotected intercourse. For women aged 35 and above, this definition is shortened to 6 months. Approximately 1 in 7 couples struggle with subfertility in developed countries.1 Standard treatments for subfertility, such as in vitro fertilization and intrauterine insemination are often costly and invasive. An alternative approach for treating subfertility is natural procreative technology (NPT), which aims to correct underlying causes of subfertilityto facilitate natural conception and pregnancythrough intercourse. This analysis focuses on data from the International Natural Procreative Technology Evaluation and Surveillance of Treatment for Subfertility (iNEST) cohort. The main focus of the iNEST study was to evaluate the implementation and outcomes of NPT across multiple populations.2 This analysis sought to identify whether there is a difference in time to outcome (first pregnancy and first live birth) according to NPTsurgical interventions and other selected covariates from the participants of the iNEST cohort. Evaluation of NPT-related outcomes have been limited to studies based on singular medical practices.22,23 This analysis is the first formal evaluation of the iNEST cohort, which involves multiple clinics and thus seeks to provide results otherwise uncovered by the literature. This paper reports and discusses the results of the survival analysis implemented to answer this research question. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Surgeries included in the analyses were predominantly laparoscopy and chromopertubation. Laparoscopy involves making small surgical incisions that allow equipment to take high-resolution images of the pathology and anatomy of interest.3 Chromopertubation is usually coupled with laparoscopy. The procedure involves using dyes to evaluate the blockage of the fallopian tube, which means that eggs cannot travel from the ovaries to the woman’s uterus.4 It is estimated that approximately 30-40% of infertility cases can be attributed to tubal blockage, but this varies depending on the study population.5 Data The iNEST Study cohort is comprised of 834 couples seeking fertility treatment enrolled across 10 different sites in four different countries.2 Participants considered eligible were subfertile couples with the women’s age being greater than 17 and not currently pregnant but desiring a live birth. Couples were excluded from the study if they were known to have absolute infertility, meaning that they experience a condition that would make it impossible to become pregnant (such as the removal of the uterus). Enrollment began in 2006 and finished in late 2016. Couples were asked to remain in the study for a 3-year period, although follow-up times varied. For the purposes of this project, we analyzed a maximum of 3 years of follow-up time. . The mean age for females in the cohort was 34.0. Of the 834 couples in the study, 473 experienced a pregnancy and 369 experienced a live birth. These events were not mutually exclusive, so some patients had both a recorded pregnancy and a live birth. A total of 183 of the females had a reproductive procedure during the study period, which was performed in order to achieve in vivo conception.2 The procedures performed during the study included laparoscopy, laparotomy, chromopertubation, hysteroscopy, selective hysteroscopy, and SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT hysterosalpingogram. The study population was predominantly White (48%), married (63%), and aged between 18 and 34 (52%). Frequencies for pregnancies, live births, surgeries, other covariates, and demographic variables can be found in Table 1. Methods Measures The primary endpoint for any survival analysis is typically time measured from baseline to event. Our intended outcomes were time to first pregnancy and time to first live birth for participants in the study. Some of the participants in the study had a date of their first natural procreative technology (NPT) visit, which was the preferred baseline date over consent date. If a participant had a visit date and experienced an event, their time to event was the days elapsed between the event date (pregnancy or live birth) and the visit date. Otherwise, the time to event was calculated as the number of days between the consent date and the date of the desired outcome. Right-censoring occurs when a participant enrolls in the study but exits prior to experiencing an event, i.e., does not experience the event during the established study window. Because the duration of the study for any given patient was 3 years, any participant who did not experience an event was right-censored at 1096 days. Patients who exited the study before the end of the 3-year window without experiencing an outcome were also right-censored. For patients who were known to have a pregnancy, but did not have a recorded date of conception, their assumed time to pregnancy was 1.5 years, or 547 days. This decision was later SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT compared to imputing missing time to pregnancy instead, which had little effect on the survival estimates. For those who were known to have a live birth, but no recorded date of birth, we assigned them 1 of 2 possible time points. 1) If a conception date existed, they were assigned 37 weeks (or 259 days) from the associated estimated date of conception, with 37 weeks being the average gestational period for a pregnancy from the date of conception (approximately 39 weeks from the Last Menstrual Period). 2) If no conception date or date of birth was reported, then those with a reported live birth were assigned 1.5 years of time to live birth. This automatic assignment of a mean value (i.e. mean imputation) may reduce the variance and standard deviation of the data and overlook the distribution of the data, which may cause unrealistic values in the data. The effectiveness of this method was later evaluated by comparing imputed values using the MCMC method. In some instances, participants had a recorded pregnancy and/or live birth prior to their first clinic visit or consent date. These patients were still included in the analysis, despite having no measured time before baseline. Time trying to become pregnant prior to enrollment in the study was coded as a dichotomous variable, separated by those who tried for 0 to 1 years and those who tried for 1+ years. Having ever had any prior pregnancy was coded as a dichotomous variable (0 = no prior pregnancy, 1 = any prior pregnancy). Similarly, any previous live birth was also a binary variable (0 = no prior live birth, 1 = any prior live birth). SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Previous treatment had two levels: ever had fertility treatment and never had fertility treatment. Treatments considered for this covariate were prior in-vitro fertilization (IVF) and intrauterine insemination (IUI). NPT surgeries recorded for patients in the cohort included laparotomy, laparoscopy, robotic assisted laparoscopic surgery, hysterosalpingogram, chromopertubation, hysteroscopy and selective hysterosalpingogram. For the primary analysis, we focused on those who had undergone a laparotomy, laparoscopy, robotic assisted laparoscopic surgery, or chromopertubation, which are all naturally connected to one another. A laparotomy often follows a laparoscopic surgery, and, as mentioned above, chromopertubation often occurs in tandem with laparoscopy. The other categories of surgery had high levels of missingness (up to 75%), and were therefore dropped in order to maintain the accuracy of results. Age at consent was originally collapsed into several categorical ranges. However, seeking infertility treatment in early adulthood is often rare, so the sample size of those younger than 25 was relatively small (18 people). Therefore, we opted to include a 2-category age in the models with groups including those aged 19 to 34, and 35 and older. This is a natural distinction, due to the earlier mentioned fact that the definition of subfertility changes at age 35.1 Demographic variables that were considered for the analysis but left out due to high amounts of missing data were annual household income, marital status, and race/ethnicity. Survival Analyses SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Survival refers to the time to an event. The probability of survival for a cohort up until a given time point can be measured in different ways. In this analysis, we analyzed time to outcomeby producing Kaplan-Meier curves and we predicted survival by using Cox proportional hazards models. We used three Cox models, each with progressing complexity to produce effective estimates with increasing accuracy. First, we used a Cox model for the complete data to serve as a comparison. Second, we imputed the missing data and evaluated survival using a Cox model in order to adjust for missing bias. Third, we included a time-varying factor in the imputed model to adjust for the effect of the value of surgery changing over time. The first two models served as comparisons for the third model, to ensure the goodness of fit for our final model. The following sections define Kaplan-Meier curves and Cox models. Kaplan-Meier Curves Kaplan-Meier curves are a way of measuring the probability of survival over a given period of time.6 In this case, we measured the probability of becoming pregnant or having a live birth during the course of a study. To meet the assumptions of non-informative censoring, we assumed that censored patients had equal probability of getting pregnant or having a live birth as those who remained in the study. Second, we assumed no difference in survival probability between those who were enrolled toward the beginning or end of the study. Finally, we assumed that the event of pregnancy or live birth did occur at the reported time.7 The KaplanMeier estimate (conditional survival probability) at any given point is calculated as follows: Spregnant = 1 – Number of subjects pregnant / Number of subjects not pregnant at the start7 And SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Slb = 1 – Number of subjects with a live birth/ Number of subjects without a live birth at the start7 The cumulative probability of survival up to any time interval is calculated by multiplying conditional probabilities of each time interval up to that point. For example, if any patient had not become pregnant at time = 2 days, the cumulative survival probability would be calculated as the probability of not being pregnant on the first day times the probability of not being pregnant on the second day given that they were not pregnant on the first.7 Survival functions can be compared for different groups of subjects. We stratified the Kaplan-Meier curves of study participants by several demographic variables to determine if there existed different survival probabilities across different groups. To verify statistical significance of these differences, we used a log-rank test. The null hypothesis of the log-rank test assumes that there is no difference between the survival probabilities of the compared groups.8 The log-rank test assumes a non-parametric fit, meaning that the data do not necessarily follow any particular known distribution. It then calculates the sum of the difference between the observed number of events and the calculated expected number of events. This calculation follows a chi-square distribution with a single degree of freedom. A small computed p-value (typically <0.05) from this distribution denotes a statistically significant difference between two groups.8 We performed log-rank tests to detect differences in probability of pregnancy and live birth for several demographic factors including race/ethnicity, age groups (19-24, 25-34, and 35+), previous live birth (yes or no), previous pregnancy (yes or no), income level, and SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT education level. Additional covariates evaluated were whether the patients previously had a type of infertility treatment, prior time trying to become pregnant, and prior infertility treatment. The Kaplan-Meier method is limited in that it cannot allow the adjustment of confounders or produce a single effect estimate with associated confidence bands.9 Thus, we used Cox regression to approach this problem. Cox Proportional Hazards Regression The Cox proportional hazard model is a semiparametric method because it assumes nothing about the distribution of times of survival. However, an important assumption is that the hazard of each variable in the model is constant over time. If the survival curves of levels of a covariate cross one another, this violates the assumption of constant hazard ratio over time.9 The Cox proportional hazard model is mathematically defined as: H(t)=H0(t)×exp[b1x1+b2x2+⋯..bkxk] Where the xi represent the predictor variables and the betas represent their regression coefficients. H0(t) is referred to as the “baseline hazard,” which represents the hazard of an individuals with all modeled predictors equal to zero. The hazard ratio represents a comparison between the hazard rates of an endpoint according to exposed versus unexposed patients.9 It implies the probability that a patient that has not yet experienced the outcome will experience the outcome over the next time interval, divided by the time interval, which is typically very short, therefore creating an instantaneous rate.10 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT In the context of the study, we compared the hazard of pregnancy/live birth according to any given exposure, such as the ratio of hazards for those who had a surgery during the course of the study versus those who did not. A hazard ratio is computed by exponentiating the regression coefficient bi calculated by Cox regression.9 We verified that the proportional hazards assumption was met and also computed Area Under the Curve (AUC) to test the discriminatory capability of each of the models.26 We first constructed a crude model for both pregnancy and live birth to measure the hazard ratio of either outcome without adjusting for confounders or covariates. Next, we added the covariates to the model to adjust for potential confounding to create the complete model. The AUC value for the complete model averaged around .65, indicating a weak-to-acceptable fit. However, future models showed an average closer to 0.70, which is considered acceptable.26 Due to the large amount of unobserved data in the study, particularly with covariates, the next step was to perform multiple imputation. Multiple Imputation Multiple Imputation is used to simulate the values of missing observations by using relationships among the non-missing variables in the data.11 This is a useful process that allows researchers to avoid dropping large amounts of observations due to missingness.12 The use of the word ”multiple” implies that several iterations of the simulation are run in order to reduce the chances of false conclusions.11 Before beginning the multiple imputation process, we needed to ensure that our assumption that the data were not missing completely at random was correct. Thus, we performed Little’s test (p<0.0001), which indicates that the data are not SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT missing completely at random. Data distributions for imputed and non-imputed data were compared using chi-square tests and were not significantly different across the variables. In addition, the survival curves for imputed data followed the same patterns as the unimputed data. Therefore, we continued with the assumption that the data were missing at random. Multiple Imputation is not always practical when the percentage of missing data is large (>50%). Therefore, we ultimately determined that dropping race/ethnicity and income from the analysis would produce more interpretable and accurate results. Researchers generally determine the number of imputations to be performed. We chose to perform 10 iterations,13 a decision which was validated by high levels of relative efficiency reported in the imputation output. We included all variables to be used in the analysis in the multiple imputation model.14 Once the designated number of imputations has been performed, the researcher must analyze and compare the imputed datasets. After computing the analysis of interest (cox regression, in this case) with each imputed dataset, the effect estimates are combined using standards according to the type of analysis (i.e. Cox modeling).11 We were satisfied with relatively low added variances between imputed variables, which suggested the robustness of the imputed data. A comparison of the results from the complete and imputed data can be found in the Discussion section of the paper. Time-Varying Confounding Time-varying confounding takes place when the value of a variable changes over time, which violates the assumptions of Cox proportional hazards regression.15 For example, during their follow-up time, some iNEST participants underwent surgeries to pinpoint and treat major SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT infertility issues and therefore improve their chances of becoming pregnant or sustaining a pregnancy. The effect of this change could have strong impacts on any given patient’s probability of obtaining an event. Thus, we created an additional model with surgery dates to measure the extent of this effect. To accomplish this, the data were reformatted into a counting process style.15 Sensitivity Analyses We conducted sensitivity analyses to evaluate the differences between effect estimates obtained from the imputed data and the complete data. This was necessary because the attempt to adjust for missing bias may have caused the effect estimates to change. However, we were satisfied that the significance and direction of the variables in the imputed data were the same as the complete data. sensitivity analysis assessed the difference in effect estimates obtained from using surgery as a time-dependent covariate versus surgery as a dichotomous variable. This test was performed to account for the violation of constant hazards over time for surgery and identify the differences in effect estimates after adjustment. We compared the goodness of fit between the imputed model and the time-dependent imputed model.. Goodness of fit was determined using log-likelihood and Akaike Information Criterion (AIC). In either case, a lower value indicates a better model fit. Log-likelihood attempts to maximize the likelihood of observing the data given the specified parameters. The AIC takes into account both goodness of fit and model complexity. Lower AIC is preferred, suggesting that the tradeoff between model fit and flexibility is best. The final model had lower AIC and Log-likehood values, indicating that the time-dependent imputed model was the best fit for the data. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Results In our study, 57% of participants experienced a pregnancy, and 44% achieved a live birth. However, some women did not have an outcome measured within three years after their date of consent. This reduced the percentage of women with a pregnancy to 55% and the percentage of women with a live birth to 42%. Due to high levels of missing values for other types of surgery, only those with laparoscopy, laparotomy, or chromopertubation were included in the models. The total of participants with a reported surgery wasreduced from 184 to 154 (18%). 52% of women in study (n=436) were younger than age 35, while 43% (n=362) were aged 35 or older (4% missing). 61% of participants (n=505) tried for over a year to become pregnant prior to enrollment, 15% had tried for less than one year (n=15%), and 24% of participants were missing responses (n=201). 46% of participants had a pregnancy prior to enrollment (n=386), and 24% of participants (n=199) had a prior live birth. Prior pregnancy was missing 175 responses (21%) and prior live birth was missing 473 responses (55%). 17% of participants had undergone previous IVF and/or IUI (n=17%), while 59% had never undergone either procedure (n=488). Prior treatments were missing 205 responses (n=25%). Descriptive statistics for variables and selected demographics can be found in Table 1. The four sections below detail the findings from the Kaplan-Meier curves, the crude Cox model, the imputed Cox model without time-dependent factors, and the imputed Cox model with time-dependent adjustments. Survival Curves SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT According to the Kaplan-Meier curves for unimputed data, the mean time to pregnancy was 644.65 days for the entire sample and the mean time to live birth was 774.21 days. The logrank test showed a significant difference in mean time to pregnancy for those who tried to become pregnant for a year or less compared to those who had tried to become pregnant for more than a year (408.41 vs. 661.46, p<0.0001). Similarly, there were significant differences in mean time to pregnancy and live birth across levels for the following variables: age at consent, previous treatment, prior pregnancy, and prior live birth. The mean time to pregnancy for those who had a surgery was 584.32 days, while the mean time for those who did not have surgery was 637.08. The mean time to live birth for those with a surgery was 829.08 days, and without surgery was 760.22 days. Mean and median survival time estimates for all covariate variables can be found in Table 2. All variables evaluated for the analysis met the assumption of proportional hazards. Cox Proportional Hazards Regression for complete data The variables included in this model were the outcome (time to pregnancy/time to live birth), surgery status, prior pregnancy, prior live birth, previous IVF, previous IUI, age at consent, and time trying to become pregnant prior to enrollment. IVF and IUI were originally included in models separately, but were found to be non-influential in predicting hazard ratios. When they were combined into a single variable, however, the effect on survival was statistically significant. 246 observations were deleted from the complete case analysis for the outcome of pregnancy due to having at least one missing value across all variables included in the model. Similarly, 522 observations were deleted from the complete case analysis of live birth. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Hazard ratios with their associated confidence intervals and p-values can be found in Table 3 and Table 4. Surgery was not a significant predictor of pregnancy or time to live birth for the model. Those with no prior pregnancy were significantly less likely to become pregnant (HR: 0.54, CI: 0.313, 0.764), and those with no prior live birth were significantly less likely to have a live birth (HR: 0.68, CI: 0.331, 1.023). Participants aged 35+ were significantly less likely to become pregnant or have a live birth than participants younger than 35 (HR: 0.74, CI: 0.522, 0.958; ( and HR: 0.57, CI: 0.234, 0.899; respectively). Women who had tried to become pregnant for more than a year prior to enrollment were 31% less likely to become pregnant (CI: 0.412, 0.978) and 40% less likely to have a live birth (CI: 0.176, 1.031) than those who had tried for less than a year. However, there was no significant relationship between time trying and live birth. Those who had never undergone IUI and/or IVF were significantly less likely to become pregnant (HR: 0.695, CI: 0.412, 0.978) and less likely to have a live birth (HR: 0.57, CI: 0.14, 1.012). Imputed Cox Proportional Hazards Regression Without Time-varying Considerations We fitted Cox regression models for pregnancy and live birth to imputed data. The exposure of interest was whether the participants had experienced a selected surgery during the course of the study or not. The only distinction between the two models was that for the pregnancy model, we included previous pregnancy as a covariate; meanwhile, in the live birth model we included previous live birth. This is a distinction that makes clinical sense. Other covariates included in both models were as follows: female age, previous fertility treatments, and time trying prior to enrollment. A total of 834 participants were included in both models. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Hazard ratios for the imputed cox model can be found in Table 3 and Table 4. The effect of surgery on the hazard of pregnancy was not statistically significant (HR: 1.09, CI: 0.85, 1.41; p = 0.482). Prior pregnancy, previous treatment, age at consent, and time trying were all significant predictors of time to pregnancy. Those who never had a prior pregnancy had a 48% lower chance of becoming pregnant than those who had ever had a pregnancy (HR: 0.522, CI: 0.41, 0.66, p <0.0001). Participants with either previous in-vitro fertilization or previous intrauterine insemination experienced a 49% lower chance of becoming pregnant when compared with those who had never had such treatments (p=0.0037). Those aged 35 and greater had a 28% reduced chance of becoming pregnant when compared to those younger than 35 (p=0.0002). Finally, those who had spent more than 1 year of time trying to become pregnant prior to enrolling in the study had a 41% lower chance of becoming pregnant during the course of the study than those who had tried for less than 1 year (HR: 0.592, CI: 0.45, 0.77; p = 0.0002). Although the model was tested for interactions between surgery, age, time trying, and prior pregnancy, none of the interactions was statistically significant and therefore we did not include any interactions inthe model. The effect of surgery on predicting time to live birth was also not statistically significant (HR: 0.92, CI: 0.68, 1.24; p=0.57). Women who had prior IVF or IUI treatments were less likely to have a live birth than those who never had prior treatments (HR: 0.58, CI: 0.41, 0.81; p = 0.0019). Those who had never had a prior birth were 29% less likely to have a live birth than those with any prior live birth (HR: 0.71, CI: 0.50, 1.01; p=0.0517), although the effect was marginally insignificant. Participants aged 35 and older were 30% less likely to experience a live birth than those younger than 35 (HR: 0.70, CI: 0.56, 0.88; p=0.002). Those who had tried to SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT become pregnant for more than a year prior to study enrollment were 42% less likely to give birth than their counterparts (HR: 0.58, CI: 0.43, 0.78; p = 0.0005). This model was also tested for interactions between surgery and the covariates, but none was statistically significant. Imputed Cox Proportional Hazards Regression With Time-varying To account for the time-varying effect of surgery, we reformatted the data into counting process style, which creates multiple rows for each observation with a time-varying component. For example, if a participant had a surgery halfway through the study and later had a pregnancy, their data would be separated into two time intervals. The first time interval would measure time from enrollment to time of surgery. The next interval would measure the time from the surgery to the pregnancy outcome. Because of adding additional rows for participants with a surgery, the number of observations included in the pregnancy model was 916 and the live birth model included 910. Our time-varying models included the same variables as the original Cox models, with the additional differentiation in the format of the surgery variable. Additionally, both models were stratified by age in order to account for the unmet assumption of proportional hazards for age. Hazard ratios for the time-dependent model can be found in Table 3 and Table 4. Having a surgery during the course of the study was not associated with time to pregnancy (HR: 0.86, p=0.41). Those with a prior IVF and/or IUI treatment were 32% as likely to become pregnant compared to those without a treatment (CI: 0.50, 0.91; p =0.010). Participants aged 35 and above were 28% less likely to become pregnant than their counterparts (CI: 0.58, 0.90; p SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT = 0.0033). There was a statistically significant interaction between time trying and prior pregnancy (p=0.0313). Given time trying to become pregnant was less than a year, if a patient had no prior pregnancy, their chance of pregnancy was reduced by approximately 65% (CI: 0.22,0.57). The hazard ratios for this interaction can be found in Table 5. All other levels of the interaction between time trying and pregnancy were not statistically significant. The highest relative increase in variance due to imputation for any of the variables in this model was 0.41 for time trying, and the lowest relative efficiency was 97%, also for time trying (Appendix II, Table 1). In this model, participants who had a surgery were 48% less likely to experience a live birth when compared to those without surgery (CI: 0.34, 0.80; p<0.0028). Having a prior live birth was not a significant predictor of live birth (p=0.0726). Those who had prior IVF or IUI were 42% less likely to have a live birth compared to their counterparts (CI:0.41,0.83; p=0.0027), and those who tried for longer than a year to become pregnant were 43% less likely to have a live birth than those who tried for less than a year (CI: 0.42, 0.78; p=0.0005). Participants aged 35 or greater were 29% less likely to have a live birth compared to those under age 35 (CI: 0.57, 0.89). Interactions were tested for the covariates included in the model, but none were statistically significant. The highest relative increase in variance for any variable in this model due to imputation was 0.45 in prior live birth, which also had the lowest relative efficiency value at 95.6% (see Appendix II, Table 1). Model Validation SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT We conducted several models with different parameters (sensitivity analyses) to test the effectiveness of our final model. The first analysis involved a model that imputed time to pregnancy/time to live birth instead of arbitrarily assigning time 1.5 years to any woman who was missing dates. Upon visual inspections, the effect estimates were not significantly different and the model fit statistics were not better. To validate our final model, we computed Schoenfeld residuals to further evaluate proportional hazards assumptions with the imputed data. The plot of the residuals and the correlation matrix showed no relationship between any of the covariates and time, thus meeting the assumption that the residuals were independent of time (see Appendix II, Figure 1). Finally, we compared the log likelihood model fit statistics and the AIC criteria between the non-time-dependent model and the time-dependent model. The time-dependent model had both a lower log likelihood statistic and a lower AIC than the original imputed model, which suggests that the final model is the better of the two. Discussion The complete, imputed, and time-dependent imputed models shared general agreement with their hazard ratio estimates, which validates the agreement between imputed and complete data. We found that our final model, the time-dependent imputed model, had the best fit for the data. 30% of couples trying to become pregnant conceive within the first month of trying. The probability of conception decreases to 5% after a year of trying.16 This reflects the results from SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT the majority of our survival models, which demonstrate decreased chances of becoming pregnant after trying for a year. Women generally experience reduction in fertility capability in their late 30s to early 40s.16 Some research shows a general decline in fertility for women from age 19 to 40 along with a decline in male capability after age 30.24 Our results in each of the Cox models displayed a similar relationship, where those aged 35 and above were less likely to experience a pregnancy or a live birth. Although we measured age in 2 categories, having a greater number of categories would be more informative. However, in the age group 19-25, after censoring, there were only 10 observed pregnancies and 7 observed live births out of 18 total participants. This is approximately 2% of the study population, which would not produce a sufficiently powerful enough estimate if the number of age categories were to be expanded. In couples with at least one prior pregnancy (secondary infertility), the chance of conception is greater when compared with those who experience primary infertility.16,25 Our results were similar to this, suggesting that women in the iNEST cohort experienced lower rates of becoming pregnant without experiencing any prior pregnancy. The interaction between time trying and prior pregnancy in the pregnancy survival model showed that when a patient tried to become pregnant for less than 1 year and had no prior pregnancy, their chance of becoming pregnant was significantly reduced. This aligns with the results from the non-time-dependent models, which suggest that having a pregnancy reduces the chance of another pregnancy. Additionally, this result agrees with other published research, which shows increased rates of pregnancies among women with prior pregnancies.16 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Sapra et al17 found that women who had a prior failed pregnancy had a longer time to second pregnancy. One study found that within a year of undergoing a laparoscopy, 30% of women achieved a pregnancy.18 Another retrospective analysis found that the mean time to pregnancy after a laparoscopic intervention was 10 months.19 In contrast, the mean time to pregnancy from the date of a laparoscopy in the iNEST cohort was 7.3 months. Similarly, the mean time to live birth after a laparoscopy in the iNEST cohort was 15.6 months. We found that surgery (laparoscopy, laparotomy, robotic assisted surgery, and chromopertubation) was not a statistically significant predictor for pregnancy in any of the models. This could be explained by unmeasured factors that may prompt a woman to undergo such a surgery, such as medical history. For example, Littman et al19 observed that at the time of laparoscopy, greater than 90% of women had endometriosis or other pelvic pathology. Such reproductive complications may interfere with conception time. We also suspected an interaction between age and surgery might have contributed to this difference, because participants in the lowest age category had relatively low numbers of surgery. However, this interaction was not statistically significant, nor were the interactions between other covariates in surgery. Another explanation is the low power to estimate surgery effects due to the low number of participants who had a pregnancy and a surgery (10%). Given that diagnostic data was not available, patients who underwent a surgery might have been more likely to have a serious underlying cause of subfertility, which would prolong their time to pregnancy. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT For the live birth time-dependent model, we found that the chance of live birth was statistically lower for those who had a surgery. In addition to the discussion immediately above, this may be explained by the relatively small sample pool of those who had a live birth and a surgery (9%). One study from Yu et al20 found that patients having undergone laparoscopy trended towards an increase in live birth rates, although the estimate was not statistically significant. It is possible that due to the amount of missing data in the cohort, we were unable to draw out the true relationships between the variables. This could contribute to the unexpected results in relation to the impact of surgery, or the lack of statistical significance in relation the association between prior live birth, and the probability of a live birth in the study. Multiple Imputation generally produces effective estimates when the proportion of missing data is 10% or below. Some studies have shown effectiveness for much larger percentages, although the bias is more likely with greater percentages.21 Prior live birth had the highest proportion of missing data (approximately 55%), which is not desirable. Thus, some level of bias for overestimating or underestimating values may be present in the imputed data. Strengths This was the first analysis that evaluated NPT outcomes across multiple clinics. Although the percentage of missing data in some cases was relatively high (~50%), we compared effect estimates between the complete and imputed data and found them to agree on variable significance. Along with the large sample size, which adds power and decreases variability in imputed estimates, this comparison reduces the concern of missing bias in the analysis. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Limitations As noted, the iNEST cohort featured large percentages of missing data, with some percentages of missingness ranging up to greater than 50%. We had to drop certain variables with higher percentages of missing data from the analysis, such as race/ethnicity and income, which could affect the goodness of fit of the model used in the analysis. The high level of unmeasured data may be attributable to the differences in reporting practice between the various clinics involved in the research. Despite the high amount of missing data in covariates, there were few missing data for the outcome data for pregnancy and live birth, which may reduce the concerns of biases present in the results. Additionally, the sample size for those with a pregnancy/live birth and a surgery was relatively small, which decreased the power to assess the impact of surgery. Otherwise, sample sizes of the intersection between outcome events and covariates were sufficiently large. Some important elements that may influence conception were not considered in our models due to lack of data. For example, the models did not measure the timing of intercourse relative to the female’s ovulation cycle.16 Similarly, the models did not take into account any clinical diagnoses that may influence reproductive capability (other than absolute infertility, which was part of the study’s exclusion criteria) or any medications taken by the couple that may have had an impact. Body mass index (BMI > 30) has also been known to be a predictor of infertility,16 but BMI was not included in our study. If these factors were to be included in the analysis, it is possible that the significance of the effect of surgery procedures on pregnancy may increase and the relationship between surgery and live birth may become positive. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Conclusions Overall, the results in our survival analysis implied that those who have tried to conceive for over a year or have undergone previous treatments such as IVF or IUI have lower chances of becoming pregnant or achieving a live birth. In addition, those with no prior pregnancy were less likely to become pregnant. The results for surgery’s effect on pregnancy were ultimately inconclusive, while the effect of surgery on live birth was negative. Further evaluation may be required to examine underlying causes that may cause surgery to be associated with increased time to live birth, including more complete data on clinical factors including prior live birth, and underlying medical diagnoses. Clinical Implications These findings may help guide decision-making for couples seeking a pregnancy, considering RRM. In particular, it will help provide more realistic assessments of live birth among couples who have tried to conceive for over a year, undergone previous fertility treatments, aged older than 35, or without a prior pregnancy. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT References 1. Vander Borght M, Wyns C. Fertility and Subfertility: Definition and epidemiology. Clinical Biochemistry. 2018;62:2-10. doi:10.1016/j.clinbiochem.2018.03.012 2. Stanford JB, Parnell T, Kantor K, et al. International Natural Procreative Technology Evaluation and Surveillance of Treatment for Subfertility (iNEST): enrollment and methods. Hum Reprod Open. 2022;2022(3):hoac033. Published 2022 Aug 9. doi:10.1093/hropen/hoac033 3. Garry R. Laparoscopic surgery. Best Pract Res Clin Obstet Gynaecol. 2006;20(1):89-104. doi:10.1016/j.bpobgyn.2005.10.003 4. Chromopertubation and Laparoscopy. Tampa General Hospital. Updated 2024. Accessed March 21, 2024. https://www.tgh.org/institutes-and-services/testing-anddiagnostics/chromopertubation 5. Ambildhuke K, Pajai S, Chimegave A, Mundhada R, Kabra P. A Review of Tubal Factors Affecting Fertility and its Management. Cureus. 2022;14(11):e30990. Published 2022 Nov 1. doi:10.7759/cureus.30990 6. Altman DG. London (UK): Chapman and Hall; 1992. Analysis of Survival times.In:Practical statistics for Medical research; pp. 365–93. [Google Scholar] 7. Goel MK, Khanna P, Kishore J. Understanding survival analysis: Kaplan-Meier estimate. Int J Ayurveda Res. 2010;1(4):274-278. doi:10.4103/0974-7788.76794 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT 8. Hazra A, Gogtay N. Biostatistics Series Module 9: Survival Analysis. Indian J Dermatol. 2017;62(3):251-257. doi:10.4103/ijd.IJD_201_17 9. Abd ElHafeez S, D'Arrigo G, Leonardis D, Fusaro M, Tripepi G, Roumeliotis S. Methods to Analyze Time-to-Event Data: The Cox Regression Analysis. Oxid Med Cell Longev. 2021;2021:1302811. Published 2021 Nov 30. doi:10.1155/2021/1302811 10. Spruance SL, Reid JE, Grace M, Samore M. Hazard ratio in clinical trials. Antimicrob Agents Chemother. 2004;48(8):2787-2792. doi:10.1128/AAC.48.8.2787-2792.2004 11. Li P, Stuart EA, Allison DB. Multiple Imputation: A Flexible Tool for Handling Missing Data. JAMA. 2015;314(18):1966-1967. doi:10.1001/jama.2015.15281 12. He Y. Missing data analysis using multiple imputation: getting to the heart of the matter. Circ Cardiovasc Qual Outcomes. 2010;3(1):98-105. doi:10.1161/CIRCOUTCOMES.109.875658 13. Stuart EA, Azur M, Frangakis C, Leaf P. Multiple imputation with large data sets: a case study of the Children's Mental Health Initiative. Am J Epidemiol. 2009;169(9):1133-1139. doi:10.1093/aje/kwp026 14. von Hippel, P. T. (2009). 8. How to Impute Interactions, Squares, and other Transformed Variables. Sociological Methodology, 39(1), 265-291. https://doi.org/10.1111/j.14679531.2009.01215.x 15. Zhang Z, Reinikainen J, Adeleke KA, Pieterse ME, Groothuis-Oudshoorn CGM. Timevarying covariates and coefficients in Cox regression models. Ann Transl Med. 2018;6(7):121. doi:10.21037/atm.2018.02.12 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT 16. Taylor A. ABC of subfertility: extent of the problem. BMJ. 2003;327(7412):434-436. doi:10.1136/bmj.327.7412.434 17. Sapra KJ, McLain AC, Maisog JM, Sundaram R, Buck Louis GM. Successive time to pregnancy among women experiencing pregnancy loss. Hum Reprod. 2014;29(11):25532559. doi:10.1093/humrep/deu216 18. Mahran A, Abdelraheim AR, Eissa A, Gadelrab M. Does laparoscopy still has a role in modern fertility practice?. Int J Reprod Biomed. 2017;15(12):787-794. 19. Littman E, Giudice L, Lathi R, et al. Role of laparoscopic treatment of endometriosis in patients with failed in vitro fertilization cycles. Fertil Steril 2005;84:1574–8. 20. Yu X, Cai H, Guan J, Zheng X, Han H. Laparoscopic surgery: Any role in patients with unexplained infertility and failed in vitro fertilization cycles?. Medicine (Baltimore). 2019;98(13):e14957. doi:10.1097/MD.0000000000014957 21. Lee JH, Huber JC Jr. Evaluation of Multiple Imputation with Large Proportions of Missing Data: How Much Is Too Much?. Iran J Public Health. 2021;50(7):1372-1380. doi:10.18502/ijph.v50i7.6626 22. Stanford JB, Parnell TA, Boyle PC. Outcomes from treatment of infertility with natural procreative technology in an Irish general practice [published correction appears in J Am Board Fam Med. 2008 Nov-Dec;21(6):583]. J Am Board Fam Med. 2008;21(5):375-384. doi:10.3122/jabfm.2008.05.070239 23. Tham E, Schliep K, Stanford J. Natural procreative technology for infertility and recurrent miscarriage: outcomes in a Canadian family practice. Can Fam Physician. 2012;58(5):e267-e274. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT 24. Dunson DB, Baird DD, Colombo B. Increased infertility with age in men and women. Obstet Gynecol 2004;103(1):51-6. 25. Mikolajczyk RT, Stanford JB. Measuring fecundity with standardised estimates of expected pregnancies. Paediatric and Perinatal Epidemiology 2006;20 Suppl 1:43-50 26. Mandrekar JN. Receiver operating characteristic curve in diagnostic test assessment. J Thorac Oncol. 2010;5(9):1315-1316. doi:10.1097/JTO.0b013e3181ec173d Table 1. Variable frequencies for the iNEST Study Cohort. Variable Name N % Pregnancy No Pregnancy 361 43% At least one Pregnancy 473 57% 465 369 56% 44% 8 1% 63% 36% Live Birth No Live Birth At least one Live Birth Relationship Status Unmarried Married Missing Income 526 300 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT <25,000 25,001-50,000 50,001-75,000 75,001-100,000 100,000+ Missing Race/Ethnicity Non-Hispanic White Non-Hispanic Asian Hispanic Other Missing Age 25-34 Years 35+ Years Missing Prior IVF Treatment No Yes Missing 11 55 78 91 141 458 397 36 32 11 358 436 362 36 56 1% 7% 9% 11% 17% 55% 48% 4% 4% 1% 43% 52% 43% 4% 296 7% 58% 35% Prior IUI No Yes Missing 123 506 205 15% 61% 25% Previous IVF/IUI Combined No Yes Missing 488 141 205 59% 17% 25% Time Trying <1 year >1 year Missing 128 505 201 15% 61% 24% 482 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Any Prior Pregnancy No Yes Missing 386 273 175 46% 33% 21% Any Prior Live Birth No Yes Missing 199 162 473 24% 19% 57% Any Surgery Yes No 154 680 18% 82% SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Table 2. Mean time to Live Birth and Pregnancy according to Kaplan-Meier Curves Variable Time Trying No Yes Prior IVF Yes No Prior AI Yes No Previous Pregnancy Yes No Previous Live Birth Yes No Surgery No Yes Mean Time to Mean Live Time to Pregnancy Birth 408.41 661.49 622.61 555.5 663.95 564.91 535.09 641.89 523.68 564.85 637.08 584.32 Log-Rank Test Pregnancy (P-value) Log-Rank Test Live Birth (Pvalue) <0.0001 <0.0001 609.31 792.88 0.0078 0.0009 0.0006 0.0001 <0.0001 <0.0001 0.0178 0.0085 0.3545 0.1056 846.07 717.15 911.51 715.91 688.9 822.05 706.18 791.28 760.22 829.08 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Age Under 35 35+ 0.0057 549.85 674.42 717.01 820.66 <0.0001 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Table 3. Hazard Ratios for Time to Pregnancy Table 3. Hazard Ratios for Time to Pregnancy Variable N Crude Age HR LCL UCL P-value HR Imputed Model LCL UCL P-value HR Imputed Time-Dependent LCL UCL P-value SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT 436 18-34 Years 35+ Years 362 1.000 - - - Previous IVF/IUI Combined No Yes 0.740 0.522 0.958 488 141 1.000 - - 0.695 0.412 0.978 Time Trying <1 year >1 year 128 505 1.000 - - 0.582 0.335 Any Prior Pregnancy No Yes 386 273 0.539 Any Surgery Yes No 154 680 1.033 1.000 1.000 0.0068 1.00 0.722 0.589 0.885 0.0002 1.000 0.727 0.588 0.899 0.0033 0.0116 1.000 0.671 0.513 0.877 0.0037 1.000 0.676 0.502 0.909 0.010 0.829 <0.0001 1.000 0.592 0.452 0.775 0.0002 1.000 1.224 0.558 2.683 0.544 0.313 0.764 <0.0001 0.522 1.000 0.413 - 0.659 <0.0001 - 0.789 1.000 0.521 - 1.194 - 0.261 0.757 1.310 0.8159 1.096 1.000 0.849 - 1.414 - 0.865 1.000 0.612 - 1.222 - 0.411 - - - - 0.4820 SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Table 4. Hazard Ratios for Time to Live Birth. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Variable Age N HR 18-34 Years 35+ Years 1.000 Crude LCL UCL - P-value - 0.567 0.234 0.899 - - HR LCL Imputed Model UCL P-value 0.0008 1.00 0.70 0.56 0.88 0.0125 1.00 0.58 0.41 0.81 1.00 0.58 0.43 0.78 HR Imputed Time-Dependent LCL UCL P-value 0.0020 1.000 0.711 0.565 0.894 0.003 0.0019 1.000 0.581 0.409 0.826 0.002 0.0005 1.000 0.572 0.421 0.776 0.000 Previous IVF/IUI Combined No Yes 488 141 1.000 Time Trying <1 year >1 year 128 505 1.000 0.604 0.176 1.031 0.0208 Any Prior Live Birth No Yes 199 162 0.677 0.331 1.023 0.0271 - 1.01 - 0.755 1.000 0.555 - 1.027 - 0.072 - 0.50 - 0.0517 1.000 0.71 1.00 Any Surgery Yes No 154 680 0.923 0.433 - 1.413 - 0.7481 0.92 1.00 0.68 - 1.24 - 0.5765 0.521 1.000 0.340 - 0.799 - 0.002 0.568 1.000 0.124 - 1.012 - Table 5. Hazard Ratios for the Interaction Between Time Trying and Previous Pregnancy. SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Interaction Time Trying and Previous Pregnancy HR LCL UCL P value Time Trying > 1 year No Prior Pregnancy 0.549402 0.284503 1.060945 0.0742 Time Trying > 1 year Any Prior Pregnancy 0.761303 0.164488 3.523554 0.7255 Time Trying < 1 year No Prior Pregnancy 0.354146 0.219588 0.571152 <.0001 Time Trying < 1 year Any Prior Pregnancy 0.788769 0.520971 1.194216 0.2607 Appendix I: SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SAS Code /******This SAS script computes time to live birth for the iNEST cohort******/ libname inest '/home/u54009922/iNEST'; /*sort all datasets required for calculation*/ proc sort data = inest.inest_study_cohort_20181113; by new_studyid; run; proc sort data = inest.npt_visit_merged; by new_studyid; run; proc sort data = inest.preg_outcome_access_brisc_v2; by new_studyid; run; /*merge and calculate the data*/ data work.lb_merge1; merge inest.preg_outcome_access_brisc_uk2 inest.npt_visit_merged inest.inest_study_cohort_20181113; by new_studyid; /*obtain correct date formats*/ format new_wconsdate date9.; visit_date = input(visitdate,mmddyy10.); format visit_date date9.; /*calculate time to exit for those who left early*/ timetoexit_v1 = wexitdate - visit_date; timetoexit_c1 = wexitdate - new_wconsdate; /*stop at 3 years*/ if timetoexit_v1 > 1096 then timetoexit_v = 1096; else timetoexit_v = timetoexit_v1; if timetoexit_c1 > 1096 then timetoexit_c = 1096; else timetoexit_c = timetoexit_c1; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT /* time to lb from first visit if live birth date */ if visit_date and outcome_date1 and outcome1 = "LB" and anylb_combined = 1 then timetolb_v = outcome_date1 - visit_date; else if visit_date and outcome1 ne "LB" and outcome2 = "LB" and outcome_date2 and anylb_combined = 1 then timetolb_v = outcome_date2 - visit_date; else if visit_date and outcome1 ne "LB" and outcome2 ne "LB" and outcome3 = "LB" and outcome_date3 and anylb_combined = 1 then timetolb_v = outcome_date3 - visit_date; else if visit_date and outcome1 ne "LB" and outcome2 ne "LB" and outcome3 ne "LB" and outcome4 = "LB" and outcome_date4 and anylb_combined = 1 then timetolb_v = outcome_date4 - visit_date; else if visit_date and outcome1 ne "LB" and outcome2 ne "LB" and outcome3 ne "LB" and outcome4 ne "LB" and outcome5 = "LB" and outcome_date5 and anylb_combined = 1 then timetolb_v = outcome_date5 - visit_date; /* time to lb from consent date (missing visit date) if live birth date */ if visit_date = . and outcome_date1 and outcome1 = "LB" and anylb_combined = 1 then timetolb_c = outcome_date1 - new_wconsdate; else if visit_date = . and outcome1 ne "LB" and outcome2 = "LB" and outcome_date2 and anylb_combined = 1 then timetolb_c = outcome_date2 - new_wconsdate; else if visit_date = . and outcome1 ne "LB" and outcome2 ne "LB" and outcome3 = "LB" and outcome_date3 and anylb_combined = 1 then timetolb_c = outcome_date3 - new_wconsdate; else if visit_date = . and outcome1 ne "LB" and outcome2 ne "LB" and outcome3 ne "LB" and outcome4 = "LB" and outcome_date4 and anylb_combined = 1 then timetolb_c = outcome_date4 - new_wconsdate; else if visit_date = . and outcome1 ne "LB" and outcome2 ne "LB" and outcome3 ne "LB" and outcome4 ne "LB" and outcome5 = "LB" and outcome_date5 and anylb_combined = 1 then timetolb_c = outcome_date5 new_wconsdate; /* time to lb from visit/consent date, if no lb date but has preg date */ /* 259 days = 37 weeks */ if visit_date and anylb_combined = 1 and timetolb_v = . and wprg1 then timetolb = wprg1 - visit_date + 259; if visit_date = . and anylb_combined = 1 and timetolb_c = . and wprg1 then timetolb = wprg1 - new_wconsdate +259; /* choose time to live birth visit over time to live birth consent */ if timetolb_v then timetolb = timetolb_v; else if timetolb_c then timetolb = timetolb_v; /* correcting extreme dates */ if timetolb_v > 1096 and timetolb_c < 1096 then timetolb = timetolb_c; else if timetolb_v > 1096 then timetolb = 1096; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT else if timetolb_c > 1096 then timetolb = 1096; /* recoding those who never had a live birth */ if anylb_combined = . and outcome1 = " " and outcome_Date1 = . then timetolb = 1096; else if anylb_combined = . and outcome1 = " " and outcome_Date1 = . then timetolb = 1096; /* for those who were censored at pregnancy date */ if timetolb_v = . and timetolb_c = . and wprg1 = . and timetoexit_v then timetolb = timetoexit_v; else if timetolb_v = . and timetolb_c = . and timetoexit_c and wprg1 = . then timetolb = timetoexit_c; else if wprg1 and visit_date and anylb_combined = . then timetolb = wprg1 - visit_date; else if wprg1 and anylb_combined = . then timetolb = wprg1 -new_wconsdate; /* recoding negative times to zero */ if timetolb < 0 then timetolb = 0; /* right-censoring the data */ if timetolb > 1096 then timetolb = 1096; /* create censor variable */ if anylb_combined = . then censored_lb = 1; if timetolb = 1096 and anylb_combined = 1 then censored_lb = 1; else if anylb_combined = 1 then censored_lb = 0; run; proc print data = lb_merge1; var anylb_combined wexitdate visit_date new_wconsdate wprg1 outcome1 outcome_date1 outcome2 outcome_date2 outcome3 outcome_date3 timetolb; run; proc print data = lb_merge1; var anylb_combined timetolb; where anylb_combined = 1; run; proc print data = work.lb_merge1; where wexitdate = new_wconsdate; var anylb_combined visit_date new_wconsdate wprg1 outcome1; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT run; /*add the dataset to a permanent library*/ data inest.lb_final; set work.lb_merge1 (keep = timetolb new_studyid censored_lb anylb_combined); run; proc freq data = inest.lb_final; table anylb_combined censored_lb; run; /*************This SAS script calculates time to pregnancy for iNEST cohort************/ libname inest '/home/u54009922/iNEST'; /*sort the data for merge*/ proc sort data = inest.inest_study_cohort_20181113; by new_studyid; run; proc sort data = inest.npt_visit_merged; by new_studyid; run; proc sort data = inest.preg_outcome_access_brisc_v2; by new_studyid; run; proc sort data = inest.final_uk; by new_studyid; run; proc contents data = inest.preg_outcome_access_brisc_v2; run; /*merge the data, calculate time to pregnancy*/ data work.date; merge inest.inest_study_cohort_20181113 (keep = wprg1 new_studyid new_wconsdate wexitdate) inest.npt_visit_merged (keep = new_studyid visitdate) inest.preg_outcome_access_brisc_uk2 (keep = new_studyid outcome_date1 outcome1 conception_date1 anypreg_combined); SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT by new_studyid; /*format dates*/ format new_wconsdate date9.; visit_date = input(visitdate,mmddyy10.); consent_date = input(new_wconsdate,mmddyy10.); endpoint_visit = intnx('day',visit_date,1096); endpoint_consent = intnx('day',new_wconsdate,1096); time_elapsed_visit = endpoint_visit - visit_date; time_elapsed_consent = endpoint_consent - new_wconsdate; /*calculate time to exit if left study early*/ timetoexit_v1 = wexitdate - visit_date; timetoexit_c1 = wexitdate - new_wconsdate; /*set time window to 3 years*/ if timetoexit_v1 > 1096 then timetoexit_v = 1096; else timetoexit_v = timetoexit_v1; if timetoexit_c1 > 1096 then timetoexit_c = 1096; else timetoexit_c = timetoexit_c1; /*time to pregnancy for clinic visit patients*/ if wprg1 then time_to_preg_visit = wprg1 - visit_date; else if wexitdate then time_to_preg_visit = timetoexit_v; else time_to_preg_visit = 1096; /* time to pregnancy for consent date patients */ if wprg1 then time_to_preg_consent = wprg1 - new_wconsdate; else if wexitdate then time_to_preg_consent = timetoexit_c; else time_to_preg_consent = 1096; /* combine them into single time variable*/ if visit_date then timetopregnancy = time_to_preg_visit; else timetopregnancy = time_to_preg_consent; /*setting baseline for pregnancies prior to enrollment*/ if timetopregnancy < 0 then timetopregnancy = 0; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT /*missing pregnancy dates*/ /*separated into those who have a visit date and those who have a consent date*/ if wprg1 = "09SEP9999"d then missing_preg_flag = 2; else if outcome_date1 ne . and wprg1 = . then missing_preg_flag = 1; else if wprg1 = . and conception_date1 ne . then missing_preg_flag = 1; else if wprg1 = . and anypreg_combined = 1 then missing_preg_flag = 2; else missing_preg_flag = 0; if missing_preg_flag = 1 and outcome_date1 and visit_date then pregnantime = outcome_date1 - visit_date 259; else if missing_preg_flag = 1 and outcome_date1 and new_wconsdate then pregnantime = outcome_date1 new_wconsdate - 259; else if missing_preg_flag = 1 and conception_date1 and visit_date then pregnantime = conception_date1 visit_date + 14; else if missing_preg_flag = 1 and conception_date1 and new_wconsdate then pregnantime = conception_date1 new_wconsdate +14; if pregnantime and pregnantime < 0 then preg_time = 0; else preg_time = pregnantime; if preg_time then timetopregnancy = preg_time; if preg_time = 0 then timetopregnancy = 0; if missing_preg_flag = 2 then timetopregnancy = 548; *1.5years assigned for those with pregnancy but missing all other dates; if anypreg_combined = . then censored = 1; else if timetopregnancy > 1096 then censored = 1; else censored = 0; if timetopregnancy> 1096 then timetopregnancy = 1096; format format format format format visit_date date9.; consent_date date9.; wprg1 date9.; endpoint_visit date9.; endpoint_consent date9.; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT run; proc print data = work.date; var timetoexit_v timetoexit_c new_wconsdate visit_date wprg1 anypreg_combined timetopregnancy; run; proc print data = work.date; var visit_date new_wconsdate outcome_date1 outcome1 conception_date1 timetopregnancy pregnantime wprg1 missing_preg_flag anypreg_combined; where missing_preg_flag = 2 or missing_preg_flag = 1; run; proc print data = work.date; var missing_preg_flag wprg1 anypreg_combined; run; proc print data = work.date; var wprg1 conception_date1; where wprg1 = .; run; proc print data = work.date n; var timetopregnancy; run; /*set permanent library*/ data inest.preg_final; set work.date (keep = anypreg_combined new_studyid timetopregnancy wprg1 outcome1 new_wconsdate visit_date censored); run; /*checking validity*/ proc print data = inest.preg_final; var new_wconsdate visit_date wprg1 anypreg_combined timetopregnancy; run; proc print data = inest.preg_final n; where timetopregnancy < 0; run; proc print data = inest.preg_final; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT where timetopregnancy > 1096; run; proc freq data = inest.preg_final; table censored; run; proc print data = inest.preg_final; var censored wprg1 timetopregnancy anypreg_combined; run; proc print data = inest.preg_final; where timetopregnancy > 1096; run; proc freq data = work.date; table anypreg_combined censored; run; proc print data = work.date n; var preg_time pregnantime wprg1 visit_date timetoexit_v timetoexit_c anypreg_combined timetopregnancy; where censored = 1 and anypreg_combined = 1; run; proc format; value timetrying 0 = '1 YEAR OR LESS' 1 = 'MORE THAN 1 YEAR'; value prev_treat 0 = 'NEVER HAD PRIOR IVF OR AI' 1 = 'HAD PRIOR IVF OR AI'; value first_preg 0 = 'NOT PREGNANT' 1 = 'PREGNANT'; value anylb_study_combined SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT 0 = 'NO LIVE BIRTH' 1 = 'LIVE BIRTH'; value prevlb_cl 1 = 'AT LEAST ONE PRIOR LIVE BIRTH' 2 = 'NO PRIOR LIVE BIRTHS'; value prevpreg_cl 1 = 'AT LEAST ONE PRIOR PREGNANCY' 2 = 'NO PRIOR PREGNANCY'; value surgery 0 = 'NO SURGERY' 1 = 'ANY SURGERY'; value age 1 = "18-24 years" 2 = "25-34 years" 3 = "35+ years" ; value surg 0 = "No surgery" 1 = "Any Surgery" ; value income_merged 0 = "Annual Income Less than $75,000" 1 = "Annual Income Greater than $75,000" ; run; /*************FINAL DATA MERGE************************************/ /* two libraries because some data sets are in different locations */ libname inest '/home/u54009922/iNEST'; libname inest2 '/home/u54009922/iNEST/Experimental Data'; /*sort the data*/ SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT proc sort data = inest.lb_final; by new_studyid; run; proc sort data = inest.preg_final; by new_studyid; run; proc sort data = inest.timetrying_merged; by new_studyid; run; proc sort data = inest.prevpreg_w_merged; by new_studyid; run; proc sort data = inest.prev_art_merged; by new_studyid; run; proc sort data = inest.surg_brisc_merged_v2; by new_studyid; run; proc sort data = inest2.prev_treat_merged; by new_studyid; run; proc sort data = inest.inest_study_cohort_20181113; by new_studyid; run; /*merge all the data*/ data inest.survival_inest; merge inest.lb_final (keep = new_studyid timetolb censored_lb anylb_combined) inest.preg_final (keep = new_studyid timetopregnancy anypreg_combined censored new_wconsdate visit_date) inest.inest_study_cohort_20181113 (keep = new_studyid race_ethn_4cat school_merged marital_merged income_merged new_age_at_consent) inest.surg_brisc_merged_uk (keep = new_studyid laparoscopy laparotomy robotic_assist chromopertuba hysteroscopy hysterosalpin selective_hys date_of_surgery) SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT inest.preghx2 (keep = new_studyid timetry_cl prevpreg_cl prevLB_cl prevIVF_cl prevAI_cl); by new_studyid; /* make three different surgery categories = laps, robotic, chromo; hysterosalpin; hysterosco, selective hys; */ if date_of_surgery ne " " then has_date = 1; else has_date = 0; /*create surgery variable*/ if laparotomy = 1 or laparoscopy = 1 or robotic_assist = 1 or chromopertuba = 1 then surgery = 1; else if hysterosalpin = 1 then surgery = 2; else if hysteroscopy = 1 or selective_hys = 1 then surgery = 3; else surgery = 0; if surgery = 0 and has_date = 1 then surgery = 4; *surgery variable without hysterosaplin due to high missingness; if laparotomy = 1 or laparoscopy = 1 or robotic_assist = 1 or chromopertuba = 1 then surgery1 = 1; else if hysteroscopy = 1 or selective_hys = 1 or hysterosalpin = 1 then surgery1 = 2; else if surgery = 0 and has_date = 1 then surgery1 = 2; else surgery1 = 0; /*creating several different combined age variables*/ if new_age_at_consent in (18,19,20,21,22,23,24) then age3cat = 1; else if new_age_at_consent in (25,26,27,28,29,30,31,32,33,34) then age3cat = 2; else if new_age_at_consent gt 34 then age3cat = 3; else if new_age_at_consent = . then age3cat = .; if new_age_at_consent in (18,19,20,21,22,23,24) then age = 1; else if new_age_at_consent in (25,26,27,28,29) then age = 2; else if new_age_at_consent in (30,31,32,33,34) then age = 3; else if new_age_at_consent gt 34 then age = 4; else if new_age_at_consent = . then age = .; if new_age_at_consent in (18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34) then age2cat = 1; else if new_age_At_consent gt 34 then age2cat = 2; else if new_age_at_consent = . then age2cat = .; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT /*pregnancy indicator variable*/ if anypreg_combined = 1 then first_preg = 1; else first_preg = 0; /* live birth indicator variable */ if anylb_combined = 1 then anylb_study_combined = 1; else anylb_study_combined = 0; /* combining treatment variables */ if previvf_cl = 1 or prevai_cl = 1 then prev_treat = 1; else if prevai_cl = . and ivf_merged = . then prev_treat = .; else prev_treat = 0; /* creating dichotomous time trying variable */ if timetry_cl = 0 then timetrying = 0; if timetry_cl = . then timetrying = .; else if timetry_cl = 1 or timetry_cl = 2 then timetrying = 1; if surgery = 0 then surgery_3cat = 0; else if surgery = 1 then surgery_3cat = 1; else surgery_3cat = 2; /*this is the surgery variable we used for the analysis*/ if surgery = 1 then any_surg = 1; else any_surg = 0; /* dichotomous income variable */ if income_merged in (1,2,3) then income_merged1 = 1; else if income_merged in (4,5) then income_merged1 = 2; format format format format format format format format format run; any_surg surgery.; timetrying timetrying.; prevlb_cl prevlb_cl.; prevpreg_cl prevpreg_cl.; age3cat age.; prev_treat prev_treat.; anylb_study_combined anylb_study_combined.; first_preg first_preg.; income_merged income_merged.; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT proc print data = inest.survival_inest n; var surgery; where laparotomy = . and laparoscopy = . and robotic_assist =. and chromopertuba = . and hysterosalpin = . and hysteroscopy = . and selective_hys = .; run; proc freq data = inest.survival_inest; table age3cat*age; run; proc freq data = inest.survival_inest; table laparotomy laparoscopy robotic_assist hysterosalpin hysteroscopy selective_hys chromopertuba ; run; proc freq data = inest.survival_inest; tables surgery; run; proc freq data = inest.survival_inest; table prev_treat prevai_cl previvf_cl; run; proc print data = inest.survival_inest; var surgery date_of_surgery has_date; run; proc contents data = inest.survival_inest; run; proc print data = inest.survival_inest n; var anylb_combined; where anylb_combined = 1; run; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT proc print data = inest.survival_inest n; var anypreg_combined; where anypreg_combined = 1; run; /*****KM Curves******/ /* crude kaplan meier */ ods select none; proc lifetest data=inest.survival_inest method=life plots=survival(cb); time TimeToPregnancy*censored(1); ods output SurvivalPlot=KaplanMeierCurve; *ods output means = mean_surv quartiles= median_surv; run; ods select all; ods select none; proc lifetest data=inest.survival_inest method=pl plots=survival(cb); time TimeToLB*censored_lb(1); ods output SurvivalPlot=KaplanMeierCurve; run; /* Kaplan Meier according to race/ethnicity */ proc lifetest data=inest.survival_inest method=life plots=survival(cb); time TimeToPregnancy*censored(1); strata race_ethn_4cat; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=life plots=survival(cb); time TimeToLB*censored_lb(1); strata race_ethn_4cat; ods output SurvivalPlot=KaplanMeierCurve; run; /* Kaplan Meier according to prior ivf */ SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata previvf_cl; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata previvf_cl; ods output SurvivalPlot=KaplanMeierCurve; run; /* Kaplan Meier according to prior ai */ proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata prevai_cl; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata prevai_cl; ods output SurvivalPlot=KaplanMeierCurve; run; /* Kaplan Meier marital status */ proc lifetest data=inest.survival_inest method=life; time TimeToPregnancy*censored(1); strata marital_merged; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=life; time TimeToLB*censored_lb(1); strata marital_merged; ods output SurvivalPlot=KaplanMeierCurve; run; /* kaplan meier income status */ proc lifetest data=inest.survival_inest method=life; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT time TimeToPregnancy*censored(1); strata income_merged; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=life; time TimeToLB*censored_lb(1); strata income_merged; ods output SurvivalPlot=KaplanMeierCurve; run; /* Kaplan Meier according to surgery */ proc lifetest data=inest.survival_inest method=life plots=survival(cb); time TimeToPregnancy*censored(1); strata any_Surg; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=life plots=survival(cb); time TimeToLB*censored_lb(1); strata any_surg; ods output SurvivalPlot=KaplanMeierCurve; run; /* surgery km with different method*/ proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata any_Surg; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata any_surg; ods output SurvivalPlot=KaplanMeierCurve; run; /* Kaplan Meier according to time trying */ TITLE 'TIME TO PREGNANCY ACCORDING TO TIME TRYING'; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata timetrying; ods output SurvivalPlot=KaplanMeierCurve; run; TITLE 'TIME TO LIVE BIRTH ACCORDING TO TIME TRYING'; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata timetrying; ods output SurvivalPlot=KaplanMeierCurve; run; /* Any prior pregnancy */ TITLE 'TIME TO PREGNANCY ACCORDING TO PRIOR PREGNANCY'; proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata prevpreg_cl; ods output SurvivalPlot=KaplanMeierCurve; run; TITLE 'TIME TO LIVE BIRTH ACCORDING TO PRIOR PREGNANCY'; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata prevpreg_cl; ods output SurvivalPlot=KaplanMeierCurve; run; /* Any previous lb */ proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata prevlb_cl; ods output SurvivalPlot=KaplanMeierCurve; run; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata prevlb_cl; ods output SurvivalPlot=KaplanMeierCurve; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT run; /* Any previous treatment */ proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata prev_treat; ods output SurvivalPlot=KaplanMeierCurve; run; TITLE 'TIME TO LIVE BIRTH ACCORDING TO PRIOR LIVE BIRTH'; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata prev_treat; ods output SurvivalPlot=KaplanMeierCurve; run; /*2 Category Age kaplan-meier*/ TITLE 'TIME TO LIVE BIRTH ACCORDING TO AGE'; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata age2cat; ods output SurvivalPlot=KaplanMeierCurve; *format age2cat age.; run; TITLE 'TIME TO PREGNANCY ACCORDING TO AGE'; proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata age2cat; ods output SurvivalPlot=KaplanMeierCurve; *format age2cat age.; run; proc freq data = inest.survival_inest; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT table surgery surgery2; run; proc print data = inest.survival_inest n; var date_of_surgery prevai_cl previvf_cl; where date_of_surgery ne " "; run; /* n=171 */ proc freq data = inest.survival_inest; table anylb_combined; run; proc freq data = inest.survival_inest; table age2/missing; run; /*************CALCULTATE TIME TO SURGERY & FORMAT INTO COUNTING PROCESS******************/ /*This SAS script creates additional observations for those who had a surgery during the study period. Some patients had surgeries prior to enrollment or after pregnancies, so those observations were not altered.*/ /* if time_before_surg is negative, stop1 is recoded to 1 */ /* if time_before_surg is greater than 1096, then stop = 1096 */ libname inest '/home/u54009922/iNEST'; /*time to surgery, part 1 of 2*/ data surgery1_preg; set inest.survival_inest (keep = age3cat first_preg new_age_at_consent any_surg surgery1 censored timetopregnancy date_of_surgery new_studyid new_wconsdate visit_date prevpreg_cl PREVLB_CL age prev_treat timetrying timetry_cl income_merged age2cat); surg_date = input(date_of_surgery,mmddyy8.); FORMAT surg_date date9.; /*calculate time before surgery1*/ if visit_date then time_before_surg = surg_date - visit_date; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT else time_before_surg = surg_date - new_wconsdate; /*calculate time after surgery1*/ time_after_surg = timetopregnancy - time_before_surg; /* initialize starting point and ending point */ start1 = 0; stop1 = time_before_surg; /* those with no surgery are not altered, keep their time to event */ if any_surg = 0 then stop1 = timetopregnancy; if time_before_surg < 0 then stop1 = timetopregnancy; /* correcting for those who had surgery way after study period */ IF TIME_BEFORE_SURG > TIMETOPREGNANCY THEN STOP1 = TIMETOPREGNANCY; IF TIME_BEFORE_SURG > TIMETOPREGNANCY THEN any_surg = 0; /* create mulitple observations for those with qualifying surgery */ if any_surg = 1 and time_before_surg > 0 then do; start1 = time_before_surg; stop1 = time_after_surg + time_before_surg; output; end; output; run; proc means data = work.surgery1_preg; var time_after_surg; where first_preg = 1 and time_after_surg > 0 and time_before_surg > 0; run; /*part 2 of 2*/ /*the code below works for creating start/stop time (counting process format)*/ data timevary; set work.surgery1_preg end=last; retain prev_id; start1 = 0; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT if any_surg ne 0 and time_before_surg > 0 then stop1 = time_before_surg; if any_surg = 0 and time_before_surg < 0 then stop1 = timetopregnancy; if _N_ > 1 and new_studyid = prev_ID then do; if any_surg ne 0 and time_before_surg > 0 then start1 = time_before_surg; if any_surg ne 0 and time_before_surg > 0 then stop1 = time_after_surg + time_before_surg; if any_surg ne 0 and time_before_surg > 0 then flag = 1; end; prev_ID = new_studyid; if time_before_surg > 1096 then stop1 = 1096; if stop1 = . then stop1 = 128; *median time to surgery1; if censored = 1 then pregnancy = 0; else if start1 = 0 and censored = 0 and any_surg ne 0 then pregnancy = 0; else if censored = 0 then pregnancy = 1; if start1 = 0 and first_preg =1 and any_surg ne 0 then new_surgery1 = 0; else new_surgery1 = any_surg; if stop1 = 0 then stop2 = 1; if stop2 = 1 then stop1 = 1; time = stop1 - start1; run; /**set permanent library**/ data inest.timevary; set work.timevary; run; proc freq data = timevary; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT table first_preg*pregnancy; run; proc freq data = timevary; table flag*first_preg; run; /***************************************************/ /* starting live birth with time-varying covariate */ /***************************************************/ /*same code as pregnancy, with a few changes*/ libname inest '/home/u54009922/iNEST'; data surgery1_lb; set inest.survival_inest (keep = AGE2CAT age3cat anylb_study_Combined any_surg surgery1 new_age_at_consent censored_lb timetolb date_of_surgery new_studyid new_wconsdate visit_date prevpreg_cl PREVLB_CL age prev_treat timetrying); surg_date = input(date_of_surgery,mmddyy8.); FORMAT surg_date date9.; /*calculate time before surgery1*/ if visit_date then time_before_surg = surg_date - visit_date; else time_before_surg = surg_date - new_wconsdate; /*calculate time after surgery1*/ time_after_surg = timetolb - time_before_surg; *time_after_surg_lb = timetolb - time_before_surg; start1 = 0; stop1 = time_before_surg; if any_surg = 0 then stop1 = timetolb; if time_before_surg < 0 then stop1 = timetolb; IF TIME_BEFORE_SURG > TIMETOLB THEN STOP1 = TIMETOLB; IF TIME_BEFORE_SURG > TIMETOLB THEN any_surg = 0; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT if any_surg = 1 and time_before_surg > 0 then do; start1 = time_before_surg; stop1 = time_after_surg + time_before_surg; output; end; output; run; proc means data = work.surgery1_lb; var time_after_surg; where anylb_study_combined = 1 and time_after_surg > 0 and time_before_surg > 0; run; /*the code below works for creating start/stop time!*/ data timevary_lb; set work.surgery1_lb end=last; retain prev_id; start1 = 0; if any_surg ne 0 and time_before_surg > 0 then stop1 = time_before_surg; if any_surg = 0 and time_before_surg < 0 then stop1 = timetolb; if _N_ > 1 and new_studyid = prev_ID then do; if any_surg ne 0 and time_before_surg > 0 then start1 = time_before_surg; if any_surg ne 0 and time_before_surg > 0 then stop1 = time_after_surg + time_before_surg; if any_surg ne 0 and time_before_surg > 0 then flag = 1; end; prev_ID = new_studyid; if time_before_surg > 1096 then stop1 = 1096; if stop1 = . then stop1 = 128; *median time to surgery1; if censored_lb = 1 then live_birth = 0; else if start1 = 0 and censored_lb = 0 and any_surg ne 0 then live_birth = 0; else if censored_lb = 0 then live_birth = 1; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT if start1 = 0 and anylb_study_combined =1 and any_surg ne 0 then new_surgery1 = 0; else new_surgery1 = any_surg; if stop1 = 0 then stop2 = 1; if stop2 = 1 then stop1 = 1; time = stop1 - start1; run; DATA INEST.TIMEVARY_LB; SET TIMEVARY_LB; RUN; /*****************FINAL MODELS***********************************/ libname inest '/home/u54009922/iNEST'; /****AGE KM CURVES******/ TITLE 'TIME TO LIVE BIRTH ACCORDING TO AGE'; proc lifetest data=inest.survival_inest method=pl; time TimeToLB*censored_lb(1); strata age2cat; ods output SurvivalPlot=KaplanMeierCurve; *format age2cat age.; run; TITLE 'TIME TO PREGNANCY ACCORDING TO AGE'; proc lifetest data=inest.survival_inest method=pl; time TimeToPregnancy*censored(1); strata age2cat; ods output SurvivalPlot=KaplanMeierCurve; *format age2cat age.; run; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT /****CRUDE MODELS*****/ data missing; set inest.survival_inest (keep= age2cat new_studyid new_age_at_consent timetopregnancy income_merged marital_merged first_preg race_ethn_4cat previvf_cl age timetrying prevai_cl prev_treat prevpreg_cl prevlb_cl surgery censored timetry_cl); if surgery = 1 then any_surg = 1; else any_surg = 0; run; data missing_lb; set inest.survival_inest (keep= age2cat new_studyid new_age_at_consent income_merged marital_merged race_ethn_4cat previvf_cl age timetrying prevai_cl prev_treat prevpreg_cl prevlb_cl any_surg censored_lb timetolb anylb_study_combined any_surg timetry_Cl); run; /****Crude Models*****/ proc phreg data = missing ; class any_surg (ref = "0") timetrying (ref = "0") prevpreg_cl (ref="1") prev_treat (ref="0") age2cat(ref='1')/param=ref;*prevlb_cl ; model timetopregnancy*censored(1) = prevpreg_cl any_surg age2cat timetrying prev_treat any_surg/ties=efron; run; proc phreg data = missing_lb ; class any_surg (ref = "0") timetrying (ref = "0") prevlb_cl (ref="1") prev_treat (ref="0") age2cat(ref='1')/param=ref;*prevlb_cl ; model timetolb*censored_lb(1) = any_surg age2cat timetrying prev_treat prevlb_cl/ties=efron; run; /****IMPUTED MODELS*****/ /***PREGNANCY IMPUTED MODEL***/ proc mi data= missing nimpute=10 out=mi_inest seed=54321 round=1 1 1 1 1 1 1 1 min= 0 0 0 0 1 0 1 max= 1 1096 1 1 2 1 2; mcmc; var censored timetopregnancy any_surg timetrying prevpreg_cl prev_treat age2cat; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT run; TITLE " MULTIPLE IMPUTATION REGRESSION - PREGNANCY"; proc phreg data = mi_inest ; class any_surg (ref = "0") timetrying (ref = "0") prevpreg_cl (ref="1") prev_treat (ref="0") AGE2CAT(REF='1')/param=ref;*prevlb_cl ; model timetopregnancy*censored(1) = prevpreg_cl any_surg age2cat timetrying prev_treat; by _imputation_; ods output ParameterEstimates=a_preg; run; quit; proc mianalyze parms(classvar=ClassVal)=a_preg; class prevpreg_cl prev_treat any_surg age2CAT timetrying; modeleffects prevpreg_cl prev_treat any_surg age2CAT timetrying;* surgeryt; run; /****LIVE BIRTH IMPUTED****/ proc mi data= missing_lb nimpute=10 out=mi_lb seed=54321 round=1 1 1 1 1 1 1 min= 0 0 0 1 0 0 1 max= 1 1096 1 2 1 1 2 ; mcmc; var censored_lb timetolb any_surg age2cat timetrying prev_treat prevlb_cl; run; TITLE " MULTIPLE IMPUTATION REGRESSION - LIVE BIRTH"; proc phreg data = mi_lb ; class any_surg (ref = "0") timetrying (ref = "0") prevlb_cl (ref="1") prev_treat (ref="0") age2cat(REF='1') /param=ref;*prevlb_cl ; model timetolb*censored_lb(1) = any_surg age2cat timetrying prev_treat prevlb_cl; by _imputation_; ods output ParameterEstimates=a_lb; run; quit; proc mianalyze parms(CLASSVAR=ClassVal)=a_lb; class prev_treat prevlb_cl any_surg age2CAT timetrying; modeleffects prev_treat prevlb_cl any_surg age2CAT timetrying; run; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT /****TIME DEPENDENT MODELS*****/ /****PREGNANCY*****/ proc mi data= INEST.TIMEVARY nimpute=10 out=mi_inest seed=54321 round=1 1 1 1 1 1 1 min= 0 0 0 1 0 1 0 max= 1 1096 1 2 1 2 1; *class prevpreg_cl first_preg surgery1 age timetrying prevlb_cl prev_treat; mcmc; var pregnancy time new_surgery1 AGE2CAT timetrying prevpreg_cl prev_treat; run; proc phreg data = mi_inest; /*class new_surgery1 (ref = "0") timetrying (ref = "0") prevpreg_cl (ref="1") prev_treat (ref="0")/param=ref;*/ model (start1,stop1)*pregnancy(0) = new_surgery1 age2cat prev_treat prevpreg_cl timetrying prevpreg_cl*timetrying/ ties=efron rl; by _imputation_; ods output ParameterEstimates=a_preg; ods output estimates=estimate_ds(rename=(label=effect)); output out = outres ressch = ressurg resage restreat respreg restry; output out = residuals resmart = mart; HAZARDRATIO NEW_SURGERY1; hazardratio age2cat; hazardratio prevpreg_cl; hazardratio prev_treat; hazardratio timetrying; estimate 'TT_1vs_PP_1' timetrying 1 prevpreg_cl 1 timetrying*prevpreg_cl 1; estimate 'TT_1vs_PP_0' timetrying 1 prevpreg_cl 2 timetrying*prevpreg_cl 0; estimate 'TT_0vs_PP1' timetrying 0 prevpreg_cl 2 timetrying*prevpreg_cl 1; estimate 'TT_0vs_PP0' timetrying 0 prevpreg_cl 1 timetrying*prevpreg_cl 0; run; proc print data = a_preg; where _imputation_ = 1; run; proc print data = estimate_ds; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT where _imputation_=1; run; /*this is the best model*/ proc mianalyze parms=a_preg; modeleffects prev_treat prevpreg_Cl timetrying new_surgery1 age2cat PrevPreg_*timetrying run; ; proc mianalyze parms=estimate_ds; modeleffects TT_1vs_PP_1 TT_1vs_PP_0 TT_0vs_PP1 TT_0vs_PP0; run; /****LIVE BIRTH******/ proc mi data= INEST.timevary_lb nimpute=10 out=mi_lb seed=54321 round=1 1 1 1 1 1 1 min= 0 0 0 1 0 1 0 max= 1 1096 1 2 1 2 1; *class prevpreg_cl first_preg surgery1 age timetrying prevlb_cl prev_treat; mcmc; var live_birth time new_surgery1 AGE2CAT timetrying prevlb_cl prev_treat; run; proc phreg data = mi_lb; /*class new_surgery1 (ref = "0") timetrying (ref = "0") prev_treat (ref="0") PREVLB_CL(REF = '1') AGE2CAT(ref='1')/param=ref;*/ model (start1,stop1)*live_birth(0) = PREVLB_CL prev_treat timetrying AGE2CAT new_surgery1/ ties=efron rl; by _imputation_; ods output ParameterEstimates=a_lb; HAZARDRATIO new_surgery1; run; proc print data = a_lb; where _imputation_ = 1; run; proc mianalyze parms=a_lb; modeleffects PREVLB_CL prev_treat new_surgery1 AGE2CAT timetrying; run; SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT APPENDIX II: Miscellaneous Reports and Figures Table 1. Imputation Statistics Relative Relative Increase Efficiency Parameter PREVLB_CL in Variance 0.751838 0.956829 prev_treat 0.321625 0.975313 new_surgery1 0.019631 0.99807 AGE2CAT 0.032672 0.996825 timetrying 0.557811 0.963798 prevpreg_cl 0.213385 0.979107 Figure 1. Schoenfeld Residuals SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Figure 2. Model Fit Statistics Time-dependent Model SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 4217.657 4117.594 AIC 4217.657 4127.594 SBC 4217.657 4146.589 Imputed Model Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 4907.505 4816.606 AIC 4907.505 4826.606 SBC 4907.505 4846.280 Complete Model SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 1536.253 1500.919 AIC 1536.253 1510.919 SBC 1536.253 1525.733 Figure 3. Survival Curves for Covariates According to Pregnancy and Live Birth SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT SURVIVAL ANALYSIS OF LIVE BIRTH AND PREGNANCY ACCORDING TO THE iNEST STUDY COHORT |
| Reference URL | https://collections.lib.utah.edu/ark:/87278/s6pcdrnx |



