imputation model specification
-
- Posts: 1354
- Joined: Mon Oct 19, 2009 10:34 am
Re: imputation model specification
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.
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
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
Best,
Yongjoo
- Attachments
-
- STATJR_TREE_screen3.png (28.73 KiB) Viewed 20953 times
-
- Posts: 1354
- Joined: Mon Oct 19, 2009 10:34 am
Re: imputation model specification
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.
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
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
Best,
Yongjoo
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
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
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
- Attachments
-
- STATJR_TREE_screen2.png (43.41 KiB) Viewed 20947 times
-
- STATJR_TREE_screen1.png (53.49 KiB) Viewed 20947 times
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
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
However, still, I've encountered the same issue "KeyError: model" with the "ready" sign turned "idle."
Would appreciate your help!
Best,
Yongjoo
- Attachments
-
- STATJR_TREE_screen3.png (35.35 KiB) Viewed 20946 times
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
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
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
- Attachments
-
- STATJR_TREE_screen1.png (40.73 KiB) Viewed 20945 times
-
- Posts: 1354
- Joined: Mon Oct 19, 2009 10:34 am
Re: imputation model specification
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.
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
Got it! Will do that and get it back to you, Chris! Thank you again!
Best,
Yongjoo
Best,
Yongjoo
-
- Posts: 45
- Joined: Tue Jan 10, 2017 3:36 am
Re: imputation model specification
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
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
- Attachments
-
- STATJR_screen1.png (61.88 KiB) Viewed 20934 times