Hello everyone,

I am working on a project on maternal vaccination during pregnancy and acute respiratory infections in children.

1) Multiple imputation:
I have used multiple imputation to impute missing values for select covariates.
Code:
mi set mlong

mi register imputed infant_weight gestational_age maternal_bmi parity smoking_pregnancy socioeconomic_status

mi register regular vacc_status date_birth child_sex child_indigenous_status mother_indigenous_status plural_birth maternal_age

mi impute chained (logit) smoking_pregnancy (pmm, knn(10)) parity (ologit) socioeconomic_status (regress) infant_weight gestational_age maternal_bmi = i.vacc_status date_birth i.child_sex i.child_indigenous_status i.mother_indigenous_status i.plural_birth maternal_age, add(20) rseed(123) augment


2) Inverse probability treatment weighting (IPTW)
To control for probability of vaccination, we calculated inverse probability of treatment weights using predicted probabilities derived from multivariate logistic regression.
Code:
mi xeq: logistic vacc_status maternal_age maternal_bmi i.mother_indigenous_status parity year_birth month_birth i.smoking_pregnancy i.socioeconomic_status

mi xeq: predict p

mi xeq: gen IPTW=1

mi xeq: replace IPTW=1/p if vacc_status==1 // Vaccinated = 1

mi xeq: replace IPTW=1/(1-p) if vacc_status==0 // Unvaccinated = 0


3) Cox proportional hazards regressional model
We are using a weighted Cox proportional hazards regressional model to estimate unadjusted and adjusted hazard ratios of acute respiratory outcomes comparing children of vaccinated and unvaccinated mothers. Time-at-risk is time from the date of birth until either: (i) the date the child reaches fives years of age; or (ii) the date the child died. Subsequent events can occur in which case, time-at-risk is from the date of one infection and the date of the next infection.
Code:
mi stset end_date [pweight=IPTW], origin(date_birth) enter(start_date) exit(time .) fail(acute_respiratory_infection=1) id(child_ID) scale(7)

mi estimate, imputations(1/20) hr dots: stcox vacc_status child_sex child_indigenous_status preterm_birth small_gestational_age, vce(robust)

mi stset, clear


4) Kaplan-Meier curve
I would like to be able to plot one Kaplan-Meier curve using a combination of the imputed datasets. But unfortunately, here is where I am stuck. I have only managed to plot graphs per imputation.
Code:
mi stset end_date [pweight=IPTW], origin(date_birth) enter(start_date) exit(time .) fail(acute_respiratory_infection=1) id(child_ID) scale(7)

mi xeq: sts graph, survival adjustfor(child_sex child_indigenous_status preterm_birth small_gestational_age) by(vacc_status)

mi stset, clear


If anyone notices any mistakes or a better way to do any of the above methods used, please provide the better alternative. But ultimately, the Kaplan-Meier curve using multiple imputed datasets is the main problem that I would like a solution for.

Thank you very much in advance. Please do not hesitate to contact me here if you require additional information.

Kind regards,
Damien Foo
PhD Candidate
BSc (Nutrition) (Hons)
School of Public Health, Curtin University