When using the MCMC method in PROC MI, the chain=multiple option creates a separate Markov chain for each imputation; for better convergence results in smaller datasets like Fitness1, it is often beneficial to check the displayinit and itprint output to ensure that the EM algorithm (used for the starting values) has converged properly before the imputation begins.
Type : CREATION_INTERNE
The data is created directly within the script via a DATA step and the DATALINES statement. No external data source is required.
| 1 | DATA Fitness1; |
| 2 | INPUT Oxygen RunTime RunPulse @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json; |
| 3 | DATALINES; |
| 4 | 44.609 11.37 178 45.313 10.07 185 |
| 5 | 54.297 8.65 156 59.571 . . |
| 6 | 49.874 9.22 . 44.811 11.63 176 |
| 7 | . 11.95 176 . 10.85 . |
| 8 | 39.442 13.08 174 60.055 8.63 170 |
| 9 | 50.541 . . 37.388 14.03 186 |
| 10 | 44.754 11.12 176 47.273 . . |
| 11 | 51.855 10.33 166 49.156 8.95 180 |
| 12 | 40.836 10.95 168 46.672 10.00 . |
| 13 | 46.774 10.25 . 50.388 10.08 168 |
| 14 | 39.407 12.63 174 46.080 11.17 156 |
| 15 | 45.441 9.63 164 . 8.92 . |
| 16 | 45.118 11.08 . 39.203 12.88 168 |
| 17 | 45.790 10.47 186 50.545 9.93 148 |
| 18 | 48.673 9.40 186 47.920 11.50 170 |
| 19 | 47.467 10.50 170 |
| 20 | ; |
| 21 |
| 1 | PROC MI DATA=Fitness1 seed=21355417 nimpute=40 mu0=50 10 180; |
| 2 | mcmc chain=multiple displayinit initial=em(itprint); |
| 3 | var Oxygen RunTime RunPulse; |
| 4 | RUN; |