Hello,
I am using marginal structural models to estimate the controlled direct effect of parenting practices on adolescent self-harm in the presence of time-dependent confounding.
Variable list:
propensity scores = IPTCW_withdrawal_mi_trunc
dichotomous outcome = COPY_any_harm
dichotomous exposure = COPY_mean_withdrawal_dich_MI
mediator (quartiles) = COPY_quart_SDQ_comp_MI
Using: Stata/SE 18.0
I conducted multiple imputation using MICE and generated my propensity scores in the MI set data using “mi xeq:”. The problem I am having is with estimating effects within each imputation and then pooling the results.
To date, I have been doing the following to svyset the data and obtain an estimate of the controlled direct effect:
However, if I understand correctly, the svyset command acts globally, so even though the propensity scores vary across imputation, Stata is only using one set (from one imputation) of propensity scores to estimate the controlled direct effect when using the above code. The other svyset variables (SPTN00, PTTYPE2, and NH2) do not vary across imputations (i.e., complete data).
I have tried several workarounds, but none seem to work. Example of one attempt:
I cannot seem to combine “mi xeq” with svyset or use “pweight” without svyset. Is it possible to svyset and estimate a model within each imputation and then pool (using Rubin’s rules) to obtain an overall measure of association?
Thank you kindly,
Nicole G. Hammond
I am using marginal structural models to estimate the controlled direct effect of parenting practices on adolescent self-harm in the presence of time-dependent confounding.
Variable list:
propensity scores = IPTCW_withdrawal_mi_trunc
dichotomous outcome = COPY_any_harm
dichotomous exposure = COPY_mean_withdrawal_dich_MI
mediator (quartiles) = COPY_quart_SDQ_comp_MI
Using: Stata/SE 18.0
I conducted multiple imputation using MICE and generated my propensity scores in the MI set data using “mi xeq:”. The problem I am having is with estimating effects within each imputation and then pooling the results.
To date, I have been doing the following to svyset the data and obtain an estimate of the controlled direct effect:
Code:
mi svyset SPTN00 [pweight=IPTCW_withdrawal_mi_trunc], strata(PTTYPE2) fpc(NH2) mi estimate: svy: glm COPY_any_harm i.COPY_mean_withdrawal_dich_MI i.COPY_quart_SDQ_comp_MI, fam(poisson) link(log) nolog eform
I have tried several workarounds, but none seem to work. Example of one attempt:
Code:
. scalar M = r(M)
Code:
. forvalues m = 1/75 { 2. mi xeq `m': svy: glm COPY_any_harm i.COPY_mean_withdrawal_dich_MI i.COPY_quart_SDQ_comp_MI [pweight=IPTCW_withdrawal_mi_trunc], /// > fam(poisson) link(log) nolog eform 3. } m=1 data: -> svy: glm COPY_any_harm i.COPY_mean_withdrawal_dich_MI i.COPY_quart_SDQ_comp_MI [pweight=IPTCW_withdrawal_mi_trunc], fam(poisson) link(log) nolog eform weights not allowed with the svy prefix The svy prefix assumes survey weights were already specified using svyset. r(101); end of do-file r(101);
Thank you kindly,
Nicole G. Hammond
Comment