Page 2 of 3

Re: imputation model specification

Posted: Tue Aug 15, 2017 8:29 pm
by ChrisCharlton
If it is working correctly then there should be no further inputs required after clicking the Run button. What should happen is that is runs for a few minutes while it fits the imputation model and model of interest, and then when it is completed you should get tables of coefficients for both the complete case and the imputed versions of the data. If it is stopping before it gets to this point then it is likely that there is another problem, in which case I would recommend looking for errors in the command interface window, or testing with simpler templates to ensure that the rest of the system is working as expected.

Re: imputation model specification

Posted: Tue Aug 15, 2017 8:33 pm
by yongjookim78
This is really helpful and thank you very much! It is clear that it did not work well as it stopped running only after a few seconds with the attached command produced. By the way, as you suggested, I would try to run it by using a simpler template (i.e., 2LevelImpute.py) and get it back to you! Thank you again!
Best,
Yongjoo

Re: imputation model specification

Posted: Tue Aug 15, 2017 10:13 pm
by ChrisCharlton
This error suggests to me that there may be an incompatibility with one or more of your variable names and the Stat-JR system. Would it be possible to let me know what the names of the variables you are using are so that I can confirm this? In general you will want to avoid underscores in variable names as these are often used by the system to separate out information in derived variable names.

Re: imputation model specification

Posted: Tue Aug 15, 2017 11:43 pm
by yongjookim78
Oh I think you got the point! Actually I often create categorical variables with "_cat" (i.e., smk_3cat, drnk_high, edu_3cat, marri_3cat...), which are included as the response variables for imputation models. Also, some variables (i.e., hlth_5cat) are also included as explanatory variables for imputation models. Will try again (maybe both ways - 2LevelImpute & NLevelImpute) and keep you updated! This has been so helpful and thank you!
Best,
Yongjoo

Re: imputation model specification

Posted: Wed Aug 16, 2017 4:24 pm
by yongjookim78
Hi again!
Today, I've tried it again based on your advice yesterday as follows:

1) recoded all variables without "_" (i.e., smk3cat, drnkhigh, edu3cat)

2) chose simpler template (i.e., 2LevelImpute)

3) specified both MOI and imputation models. For imputation models, I've included explanatory variables which included missing information as well. I also included explanatory variables which were used as "response for imputation models". For instance, in one model, BMI was used as response for imputation model, and then in other models (for smk3cat and edu3cat), BMI was used as explanatory variables.

Then, I've got error message, saying "KeyError: 'model'" as attached.

I am wondering whether:
- I can include variables with missing information as explanatory variables for imputation models
- I can include variables, which were used as response in one model, as explanatory variables for other imputation models.

(If neither are allowed, then the choice of explanatory variables for imputation models might be too narrow i.e., only age and sex).

Thank you again!
Best,
Yongjoo

Re: imputation model specification

Posted: Wed Aug 16, 2017 4:32 pm
by yongjookim78
Re my issue posted just now, I tried to re-specify imputation models with "age" as the only explanatory variable for all imputation model responses.
However, still, I've encountered the same issue "KeyError: model" with the "ready" sign turned "idle."
Would appreciate your help!
Best,
Yongjoo

Re: imputation model specification

Posted: Wed Aug 16, 2017 6:07 pm
by yongjookim78
Instead of "2LevelImpute" template (which I encountered issues posted above), I've tried to use NLevelImpute with following options:

1. Number of higher level classifications => 3
Higher level classification A: region (highest)
Higher level classification B: psun (second highest)
Higher level classification C: idfamn (second lowest)

2. Use conditional marginal algorithm? => Yes
3. Number of imputed data sets => 20
4. Number of iterations before first imputation => 1000
5. Number of iterations between subsequent imputations => 50
6. Length of burnin for MOI: => 100
7. Number of iterations for MOI: => 250

After I clicked "run", it worked for about 10-20 seconds, then the sign turned to "Ready(7s)" with nothing presented in the Stat-JR window. The screen shot of the command window is attached! Would appreciate your help!!

Best,
Yongjoo

Re: imputation model specification

Posted: Thu Aug 17, 2017 9:52 am
by ChrisCharlton
It's possible that an old problem has been reintroduced in MinGW. Could you try applying step 3 from http://www.bristol.ac.uk/cmm/software/s ... er-statjr/ and let us know if that fixes it? You might only need the second point, so you could try that first and then do both if it doesn't fix things.

Re: imputation model specification

Posted: Thu Aug 17, 2017 1:20 pm
by yongjookim78
Got it! Will do that and get it back to you, Chris! Thank you again!
Best,
Yongjoo

Re: imputation model specification

Posted: Thu Aug 17, 2017 2:16 pm
by yongjookim78
Hi Chris,

Re your advice on MinGW, I've done the second point of the Step 3 (http://www.bristol.ac.uk/cmm/software/s ... er-statjr/).

Just in case, the first point didn't work (maybe my MinGW is already up-do-dated?) I am attaching the related command output just in case!

Best,
Yongjoo