Hello!
My goal is to impute the variable deaths (count) given the set of other variables:
To do so, I use:
Importantly, the imputed values for deaths must be a count that falls within 1<=X<=9.
Please advice how I can add this condition in the aforementioned -mi- command.
My goal is to impute the variable deaths (count) given the set of other variables:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(deaths pop deaths_state pop_state) float gap . 55246 50189 4833722 4907 . 55395 50215 4849377 4724 . 55347 51909 4858979 4906 . 55416 52466 4863300 4723 . 195540 50189 4833722 4907 16 200111 50215 4849377 4724 20 203709 51909 4858979 4906 18 208563 52466 4863300 4723 . 27076 50189 4833722 4907 . 26887 50215 4849377 4724 . 26489 51909 4858979 4906 . 25965 52466 4863300 4723 . 22512 50189 4833722 4907 . 22506 50215 4849377 4724 . 22583 51909 4858979 4906 . 22643 52466 4863300 4723 . 57872 50189 4833722 4907 . 57719 50215 4849377 4724 11 57673 51909 4858979 4906 . 57704 52466 4863300 4723 . 10639 50189 4833722 4907 . 10764 50215 4849377 4724 . 10696 51909 4858979 4906 . 10362 52466 4863300 4723 . 20265 50189 4833722 4907 . 20296 50215 4849377 4724 . 20154 51909 4858979 4906 . 19998 52466 4863300 4723 . 116736 50189 4833722 4907 . 115916 50215 4849377 4724 . 115620 51909 4858979 4906 . 114611 52466 4863300 4723 . 34162 50189 4833722 4907 . 34076 50215 4849377 4724 . 34123 51909 4858979 4906 . 33843 52466 4863300 4723 . 26203 50189 4833722 4907 . 26037 50215 4849377 4724 . 25859 51909 4858979 4906 . 25725 52466 4863300 4723 . 43951 50189 4833722 4907 . 43931 50215 4849377 4724 . 43943 51909 4858979 4906 . 43941 52466 4863300 4723 . 13426 50189 4833722 4907 . 13323 50215 4849377 4724 . 13170 51909 4858979 4906 . 12993 52466 4863300 4723 . 25207 50189 4833722 4907 . 24945 50215 4849377 4724 . 24675 51909 4858979 4906 . 24392 52466 4863300 4723 . 13486 50189 4833722 4907 . 13552 50215 4849377 4724 . 13555 51909 4858979 4906 . 13492 52466 4863300 4723 . 14994 50189 4833722 4907 . 15080 50215 4849377 4724 . 15018 51909 4858979 4906 . 14924 52466 4863300 4723 . 50938 50189 4833722 4907 . 50909 50215 4849377 4724 . 51211 51909 4858979 4906 . 51226 52466 4863300 4723 . 54520 50189 4833722 4907 . 54543 50215 4849377 4724 . 54354 51909 4858979 4906 . 54216 52466 4863300 4723 . 12887 50189 4833722 4907 . 12670 50215 4849377 4724 . 12672 51909 4858979 4906 . 12395 52466 4863300 4723 . 10898 50189 4833722 4907 . 10886 50215 4849377 4724 . 10724 51909 4858979 4906 . 10581 52466 4863300 4723 . 37886 50189 4833722 4907 . 37914 50215 4849377 4724 . 37835 51909 4858979 4906 . 37458 52466 4863300 4723 . 13986 50189 4833722 4907 . 13977 50215 4849377 4724 . 13963 51909 4858979 4906 . 13913 52466 4863300 4723 . 80811 50189 4833722 4907 . 81289 50215 4849377 4724 . 82005 51909 4858979 4906 13 82471 52466 4863300 4723 . 49884 50189 4833722 4907 . 49484 50215 4849377 4724 . 49565 51909 4858979 4906 . 49226 52466 4863300 4723 . 41996 50189 4833722 4907 . 41711 50215 4849377 4724 . 41131 51909 4858979 4906 . 40008 52466 4863300 4723 . 71013 50189 4833722 4907 . 71065 50215 4849377 4724 . 71130 51909 4858979 4906 . 70900 52466 4863300 4723 end
Code:
mi impute poisson deaths pop deaths_state pop_state, add(1)
Please advice how I can add this condition in the aforementioned -mi- command.
Comment