gen sa = (stanx1 + stanx2) / 2
gen inc_pdi = inc * pdi
gen inc_idv = inc * idv
mi set mlong
mi register imputed inc sa inc_pdi inc_idv
set seed 46352
mi impute chained (pmm, knn(5)) inc sa inc_pdi inc_idv = pdi idv i.sex i.age i.educ i.empstat i.country, add(2) rseed(46352)
mi passive: egen incrank = xtile(inc), n(100) by(country)
mi passive: gen incrank_pdi = incrank * pdi
mi passive: gen incrank_idv = incrank * idv
mi estimate: mixed sa incrank inc i.educ i.age i.sex i.empstat pdi idv gdp gini_disp incrank_pdi incrank_idv|| country: incrank, mle
Mitglieder in diesem Forum: 0 Mitglieder und 4 Gäste