Hello everyone.
I am running a multiple imputation using data from a longitudinal study with two points of follow up, 6 and 12 months. Some variables are missing at 6 and other ones are missing at 12 months. My database now is in wide form (initially I ran the imputation with my database as long but my advisor and some articles recommend for longitudinal data, running the imputation with the dataset in wide format). After reshaping my data to wide form, declare "mi set mlong", then seeing my missing data patterns "mi misstable patterns", then "mi register imputed", I could run my imputation.
This is my code:
mi impute chained (mlogit, augment) raceg1 injtype1 dischdispo1 (ologit, augment) edlev1 comorb1 (logit, augment) pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 (regress) iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 = age1 sex1 sevheadinj1 icu1 vent1 loscat1 threegroups1, add (30) rseed (5)
After running the code Stata produced this:
convergence not achieved
convergence not achieved
logit failed to converge on observed data
error occurred during imputation of raceg1 injtype1 dischdispo1 edlev1 comorb1 pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 on m=1
r (430);
The "augment" before the commands was because of previous perfect predictor (s) detected.
Then restarted the imputation by specifying "noisily" option,
mi impute chained (mlogit, augment) raceg1 injtype1 dischdispo1 (ologit, augment) edlev1 comorb1 (logit, augment) pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 (regress) iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 = age1 sex1 sevheadinj1 icu1 vent1 loscat1 threegroups1, add (30) noisily
and I got this below:
mi impute: VCE is not positive definitive
The posterior distribution from which mi impute drew the imputations for ptsd2 is not proper when the VCE estimated from the observed data is not positive definitive. This may happen, for example, when the number of parameters exceeds the number of observations. Choose an alternate imputation model.
error occurred during imputation of raceg1 injtype1 dischdispo1 edlev1 comorb1 pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 on m = 1
r (498);
end of do-file
r (498);
Is there anyone who can help me?
What is my best option at this moment?
By the way, I ran my imputation before in long format and the codes worked perfectly, but since this is a data base from a longitudinal study, I decided running this imputation in wide form.
If you know whether there is a possibility for running multiple imputation with data base in long, please let me know.
Thank you very much.
C
I am running a multiple imputation using data from a longitudinal study with two points of follow up, 6 and 12 months. Some variables are missing at 6 and other ones are missing at 12 months. My database now is in wide form (initially I ran the imputation with my database as long but my advisor and some articles recommend for longitudinal data, running the imputation with the dataset in wide format). After reshaping my data to wide form, declare "mi set mlong", then seeing my missing data patterns "mi misstable patterns", then "mi register imputed", I could run my imputation.
This is my code:
mi impute chained (mlogit, augment) raceg1 injtype1 dischdispo1 (ologit, augment) edlev1 comorb1 (logit, augment) pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 (regress) iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 = age1 sex1 sevheadinj1 icu1 vent1 loscat1 threegroups1, add (30) rseed (5)
After running the code Stata produced this:
convergence not achieved
convergence not achieved
logit failed to converge on observed data
error occurred during imputation of raceg1 injtype1 dischdispo1 edlev1 comorb1 pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 on m=1
r (430);
The "augment" before the commands was because of previous perfect predictor (s) detected.
Then restarted the imputation by specifying "noisily" option,
mi impute chained (mlogit, augment) raceg1 injtype1 dischdispo1 (ologit, augment) edlev1 comorb1 (logit, augment) pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 (regress) iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 = age1 sex1 sevheadinj1 icu1 vent1 loscat1 threegroups1, add (30) noisily
and I got this below:
mi impute: VCE is not positive definitive
The posterior distribution from which mi impute drew the imputations for ptsd2 is not proper when the VCE estimated from the observed data is not positive definitive. This may happen, for example, when the number of parameters exceeds the number of observations. Choose an alternate imputation model.
error occurred during imputation of raceg1 injtype1 dischdispo1 edlev1 comorb1 pain11 pain12 work1 work2 func1 func2 anx1 anx2 dep1 dep2 ptsd1 ptsd2 iss1 AGG_PHYS1 AGG_PHYS2 AGG_MENT1 AGG_MENT2 on m = 1
r (498);
end of do-file
r (498);
Is there anyone who can help me?
What is my best option at this moment?
By the way, I ran my imputation before in long format and the codes worked perfectly, but since this is a data base from a longitudinal study, I decided running this imputation in wide form.
If you know whether there is a possibility for running multiple imputation with data base in long, please let me know.
Thank you very much.
C