Dear Stata Technical Support,
I am analyzing longitudinal DXA Z-score data from 161 patients with 1,771 repeated observations. The number of observations per patient ranges from 1 to 33 (mean 11).
My primary objective is to examine change in DXA Z-score over time and determine whether the longitudinal trajectory differs by anatomical DXA site (spine, hip, radius) and by bisphosphonate exposure. Therefore, the principal fixed effects of interest are the interactions between time and anatomical site and between time and bisphosphonate exposure. Multiple imputation
Some observations have missing height (ht) and/or weight (kg). I therefore used multiple imputation by chained equations with predictive mean matching (20 imputations):
mi set mlong
mi register imputed ht kg
mi impute chained (pmm, knn(5)) ht kg = c.age_at_the_messuremnet##c.age_at_the_messuremnet i.genderfemale1 c.ageatthestartoftreatment i.splenectomy1yes, add(20) rseed(12345)
BMI was then calculated from the imputed height and weight values as a passive variable:
mi passive: generate bmi = kg/(ht^2)
units /kg was also calculated passively
mi passive: generate bmi = kg/(ht^2)
Mixed-effects model
I would ideally like to allow patients to differ both in their baseline Z-score and in their rate of change over time. I therefore specified a subject-specific random intercept and random slope for tx_dexa_years, allowing the two random effects to be correlated:
mi estimate, post: mixed z_score c.tx_dexa_years##ib1.z_sitespine1hip2radius3 ib2.genderfemale1 i.splenectomy1yes i.n370s_homozygous1yes i.ever_smoked c.interval_symptom_tx c.zimran_score c.ageatthestartoftreatment ib1.erttypealglecerase1imiglucerase2 c.tx_dexa_years##i.bisphosphonates_year c.bmi c.ukg || subject_id: c.tx_dexa_years, covariance(unstructured)
However, this model fails during multiple-imputation estimation with:
Hessian is not negative semidefinite
an error occurred when mi estimate executed mixed on m=1
r(430);
When I fit the same fixed-effects model but constrain the random intercept and random slope to be independent:
mi estimate, post: mixed z_score c.tx_dexa_years##ib1.z_sitespine1hip2radius3 ib2.genderfemale1 i.splenectomy1yes i.n370s_homozygous1yes i.ever_smoked c.interval_symptom_tx c.zimran_score c.ageatthestartoftreatment ib1.erttypealglecerase1imiglucerase2 c.tx_dexa_years##i.bisphosphonates_year c.bmi c.ukg || subject_id: c.tx_dexa_years, covariance(independent)
sd(tx_dexa_years) = 1.93e-06
SE = 0.0005034
95% CI = 2.2e-228 to 1.7e+216
sd(random intercept) = 1.024465
I would also like to add that I fitted the same fixed-effects specification using only a subject-specific random intercept:
mi estimate, post: mixed z_score c.tx_dexa_years##ib1.z_sitespine1hip2radius3 ib2.genderfemale1 i.splenectomy1yes i.n370s_homozygous1yes i.ever_smoked c.interval_symptom_tx c.zimran_score c.ageatthestartoftreatment ib1.erttypealglecerase1imiglucerase2 c.tx_dexa_years##i.bisphosphonates_year c.bmi c.ukg || subject_id:
with this output
Random-effects parameters | Estimate Std. err. [95% conf. interval]
-----------------------------+------------------------------------------------
subject_id: Independent |
sd(tx_dexa_years) | 1.93e-06 .0005034 2.2e-228 1.7e+216
sd(_cons) | 1.024465 .0615547 .9106533 1.152502
-----------------------------+------------------------------------------------
sd(Residual) | .7156624 .0126212 .6913478 .7408321
------------------------------------------------------------------------------
My preference, if statistically appropriate, would be to retain the random intercept, random slope, and covariance(unstructured) specification.
1. Could you please advise whether there are modifications or diagnostic steps in Stata that might allow me to fit the unstructured random-effects model reliably across the multiply imputed datasets?
2. I would also be interested to know whether the multiple imputation of height and weight, and the subsequent passive calculation of BMI, could contribute to the instability of the random-slope/unstructured model, and whether you would recommend any additional MI diagnostics in this setting.
3. Finally, if the unstructured specification cannot be estimated reliably, what random-effects structure would you recommend as the closest appropriate alternative while preserving my fixed time × anatomical-site and time × bisphosphonate interactions?
I have the complete .do and .log files available, and attach them
Kind regards
Oana
I am analyzing longitudinal DXA Z-score data from 161 patients with 1,771 repeated observations. The number of observations per patient ranges from 1 to 33 (mean 11).
My primary objective is to examine change in DXA Z-score over time and determine whether the longitudinal trajectory differs by anatomical DXA site (spine, hip, radius) and by bisphosphonate exposure. Therefore, the principal fixed effects of interest are the interactions between time and anatomical site and between time and bisphosphonate exposure. Multiple imputation
Some observations have missing height (ht) and/or weight (kg). I therefore used multiple imputation by chained equations with predictive mean matching (20 imputations):
mi set mlong
mi register imputed ht kg
mi impute chained (pmm, knn(5)) ht kg = c.age_at_the_messuremnet##c.age_at_the_messuremnet i.genderfemale1 c.ageatthestartoftreatment i.splenectomy1yes, add(20) rseed(12345)
BMI was then calculated from the imputed height and weight values as a passive variable:
mi passive: generate bmi = kg/(ht^2)
units /kg was also calculated passively
mi passive: generate bmi = kg/(ht^2)
Mixed-effects model
I would ideally like to allow patients to differ both in their baseline Z-score and in their rate of change over time. I therefore specified a subject-specific random intercept and random slope for tx_dexa_years, allowing the two random effects to be correlated:
mi estimate, post: mixed z_score c.tx_dexa_years##ib1.z_sitespine1hip2radius3 ib2.genderfemale1 i.splenectomy1yes i.n370s_homozygous1yes i.ever_smoked c.interval_symptom_tx c.zimran_score c.ageatthestartoftreatment ib1.erttypealglecerase1imiglucerase2 c.tx_dexa_years##i.bisphosphonates_year c.bmi c.ukg || subject_id: c.tx_dexa_years, covariance(unstructured)
However, this model fails during multiple-imputation estimation with:
Hessian is not negative semidefinite
an error occurred when mi estimate executed mixed on m=1
r(430);
When I fit the same fixed-effects model but constrain the random intercept and random slope to be independent:
mi estimate, post: mixed z_score c.tx_dexa_years##ib1.z_sitespine1hip2radius3 ib2.genderfemale1 i.splenectomy1yes i.n370s_homozygous1yes i.ever_smoked c.interval_symptom_tx c.zimran_score c.ageatthestartoftreatment ib1.erttypealglecerase1imiglucerase2 c.tx_dexa_years##i.bisphosphonates_year c.bmi c.ukg || subject_id: c.tx_dexa_years, covariance(independent)
sd(tx_dexa_years) = 1.93e-06
SE = 0.0005034
95% CI = 2.2e-228 to 1.7e+216
sd(random intercept) = 1.024465
I would also like to add that I fitted the same fixed-effects specification using only a subject-specific random intercept:
mi estimate, post: mixed z_score c.tx_dexa_years##ib1.z_sitespine1hip2radius3 ib2.genderfemale1 i.splenectomy1yes i.n370s_homozygous1yes i.ever_smoked c.interval_symptom_tx c.zimran_score c.ageatthestartoftreatment ib1.erttypealglecerase1imiglucerase2 c.tx_dexa_years##i.bisphosphonates_year c.bmi c.ukg || subject_id:
with this output
Random-effects parameters | Estimate Std. err. [95% conf. interval]
-----------------------------+------------------------------------------------
subject_id: Independent |
sd(tx_dexa_years) | 1.93e-06 .0005034 2.2e-228 1.7e+216
sd(_cons) | 1.024465 .0615547 .9106533 1.152502
-----------------------------+------------------------------------------------
sd(Residual) | .7156624 .0126212 .6913478 .7408321
------------------------------------------------------------------------------
My preference, if statistically appropriate, would be to retain the random intercept, random slope, and covariance(unstructured) specification.
1. Could you please advise whether there are modifications or diagnostic steps in Stata that might allow me to fit the unstructured random-effects model reliably across the multiply imputed datasets?
2. I would also be interested to know whether the multiple imputation of height and weight, and the subsequent passive calculation of BMI, could contribute to the instability of the random-slope/unstructured model, and whether you would recommend any additional MI diagnostics in this setting.
3. Finally, if the unstructured specification cannot be estimated reliably, what random-effects structure would you recommend as the closest appropriate alternative while preserving my fixed time × anatomical-site and time × bisphosphonate interactions?
I have the complete .do and .log files available, and attach them
Kind regards
Oana

Comment