I am having trouble completing MICE. I am following the guidelines suggested on the UCLA website (https://stats.idre.ucla.edu/stata/se...stata_pt1_new/) for imputing prior to using NBRM. I am imputing values of predictors (juv_sex, fah322, gangaffiliation, juv_status using admage_years as an exposure variable) and outcomes for different models using (total_allevents, psytot, or subtot). I have used the following commands to set this up:
. mi set mlong
. mi register imputed psytot subtot total_allevents juv_sex race_4cat fah322 gangaffiliation juv_status admage_years
(273 m=0 obs. now marked as incomplete)
I then proceeded with:
. mi impute chained (logit) juv_sex fah322 gangaffiliation juv_status (truncreg) psytot subtot admage_years = total_allevents, add(10) ll(0) ul(17
> ) rseed (53421) savetrace(trace1,replace)
(system variable _mi_id updated due to changed number of obs.)
option ll() not allowed
r(198);
I had previously run the impute chained command without attempting to truncate psytot, but received this error:
psytot must be greater than or equal to zero
an error occurred when mi estimate executed nbreg on m=1
r(459);
Because the values for psytot and subtot could not actually be less than 0, it seems like restricting the imputation values to a range of 0-17 (the range of scores possible) would be fine. I'm not sure what to do about the ll error. Open to suggestions.
. mi set mlong
. mi register imputed psytot subtot total_allevents juv_sex race_4cat fah322 gangaffiliation juv_status admage_years
(273 m=0 obs. now marked as incomplete)
I then proceeded with:
. mi impute chained (logit) juv_sex fah322 gangaffiliation juv_status (truncreg) psytot subtot admage_years = total_allevents, add(10) ll(0) ul(17
> ) rseed (53421) savetrace(trace1,replace)
(system variable _mi_id updated due to changed number of obs.)
option ll() not allowed
r(198);
I had previously run the impute chained command without attempting to truncate psytot, but received this error:
psytot must be greater than or equal to zero
an error occurred when mi estimate executed nbreg on m=1
r(459);
Because the values for psytot and subtot could not actually be less than 0, it seems like restricting the imputation values to a range of 0-17 (the range of scores possible) would be fine. I'm not sure what to do about the ll error. Open to suggestions.