Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The MI Procedure

Example 9.6: Checking Convergence in MCMC

This example uses the MCMC method with a single chain. It also displays time-series and autocorrelation plots to check convergence for the single chain.

The following statements use the MCMC method to create an iteration plot for the successive estimates of the mean of Oxygen. Note that iterations during the burn-in period are indicated with negative iteration numbers. These statements also create an autocorrelation function plot for the variable Oxygen.

   proc mi data=FitMiss seed=37921 noprint nimpute=2;
      mcmc timeplot(mean(Oxygen)) acfplot(mean(Oxygen));
      var Oxygen RunTime RunPulse; 
   run;

Output 9.6.1: Time-Series Plot for Oxygen
mip61.gif (4959 bytes)

By default, the MI procedure uses the plus sign (+) as the plot symbol to display the points in the plot. The time-series plot shows no apparent trends for the variable Oxygen.

Output 9.6.2: Autocorrelation Function Plot for Oxygen
mip62.gif (3300 bytes)

By default, the MI procedure uses the star sign (*) as the plot symbol to display the points in the plot, a solid line to display the reference line of zero autocorrelation, and a pair of dashed lines to display approximately 95% confidence limits for the autocorrelations. The autocorrelation function plot shows no significant positive or negative autocorrelation.

The following statements use display options to modify the autocorrelation function plot for Oxygen.

   proc mi data=FitMiss seed=37921 noprint nimpute=2;
      mcmc acfplot(mean(Oxygen) / symbol=dot lref=2);
      var Oxygen RunTime RunPulse; 
   run;

Output 9.6.3: Modified Autocorrelation Function Plot for Oxygen
mip63.gif (3364 bytes)

You can also create plots for the worst linear function, the means of other variables, the variances of variables, and covariances between variables. Alternatively, you can use the OUTITER option to save statistics such as the means, standard deviations, covariances, -2 log LR statistic, -2 log LR statistic of the posterior mode, and worst linear function from each iteration in an output data set. Then you can do a more in-depth time-series analysis of the iterations with other procedures, such as PROC AUTOREG and PROC ARIMA in the SAS/ETS User's Guide, Version 8.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.