stata multiple imputation impute chained

Atom Source

i have been trying to do a multiple imputation with stata on a big dataset (600k lines), but am getting some errors which i can't explain. Also tried different approaches, but i always have some problems.. Hope you can help me, i am kinda new to multiple imputation. And sorry for the german variables, but i guess you won't have big problems with it.

set more off
set level 99
mi set mlong
mi misstable patterns leistungsfähig  sa_n Bewilligungsdiagnosegruppen1 Berufstellung Arbeitsunf Erwerbst Rehadauer1 sb_n Berufsgrkl famstand1 Rehaart ORT bb_n, frequency


mi register imputed leistungsfähig  sa_n Bewilligungsdiagnosegruppen1 Berufstellung Arbeitsunf Erwerbst Rehadauer1 sb_n Berufsgrkl famstand1 Rehaart ORT bb_n

mi impute chained (logit, augment) leistungsfähig (regress, bootstrap) Rehadauer1(ologit) sb_n bb_n (mlogit, augment) sa_n Bewilligungsdiagnosegruppen1  Berufstellung Arbeitsunf Erwerbst Berufsgrkl famstand1 Rehaart ORT= sexn Alter_n AmR AHB, add(5) dots savetrace(trace1,replace)

errors:

  1. imputing m=1 through m=5 matsize too small You have attempted to create a matrix with too many rows or columns or attempted to fit a model with too many variables. You need to increase matsize; it is currently 400. Use set matsize; see help matsize.

increased mat-size (450, and higher), still same error

  1. If you are using factor variables and included an interaction that has lots of missing cells, either increase matsize or set emptycells drop to reduce the required matrix size; see help set emptycells.

used set emptycells drop, still same error

  1. If you are using factor variables, you might have accidentally treated a continuous variable as a categorical, resulting in lots of categories. Use the c. operator on such variables. error occurred during imputation of leistungsfähig Rehadauer1 sb_n bb_n sa_n Bewilligungsdiagnosegruppen1 Berufstellung Arbeitsunf Erwerbst Berufsgrkl famstand1 Rehaart ORT on m = 1

the problem is, only Rehadauer1 is no categorical variable.. so do i have to write c.Rehadauer1, or what does it mean?

another approach with mi and ice ():

mi register imputed leistungsfähig  sa_n Bewilligungsdiagnosegruppen1 Berufstellung Arbeitsunf Erwerbst Rehadauer1 sb_n Berufsgrkl famstand1 Rehaart ORT bb_n    
mi export ice, clear    
ice leistungsfähig m.sa_n m.Bewilligungsdiagnosegruppen1 m.Berufstellung m.Arbeitsunf m.Erwerbst i.sexn o.sb_n o.Berufsgrkl m.famstand1 m.Rehaart i.AHB m.ORT o.bb_n Alter_n  Rehadauer1 AmR, m(5) cmd(AmR Rehadauer1 Alter_n: regress) nopp  saving(icedata, replace)

the problem here is, that it will always throw the error "perfect prediction detected" if used without nopp..

imputation

Answers

comments powered by Disqus