Shared Concepts and Topics

Convergence Status

(View the complete code for this example.)

Most procedures that iterate create a table named ConvergenceStatus. The table contains a numeric column named Status and a character column named Reason. When iterations complete successfully, the status is 0. Values greater than 0 indicate something other than a successful convergence. Larger values indicate more severe problems. Different procedures produce different values for different reasons. Consult the Reason column and the SAS log for more information about nonzero values. Batch users can create an output data set from the ConvergenceStatus table and consult it to determine how to proceed with the analysis.

Sample values include the following:

0

converged; everything seemed fine

1

converged, but there was some minor problem or a reason to question the results

2

the iteration limit was reached without convergence, but everything seemed fine

3

an error prevented further iteration

The following steps illustrate how to display the convergence status:

data heights;
   input Family Gender $ Height @@;
   datalines;
1 F 67   1 F 66   1 F 64   1 M 71   1 M 72   2 F 63
2 F 63   2 F 67   2 M 69   2 M 68   2 M 70   3 F 63
3 M 64   4 F 67   4 F 66   4 M 67   4 M 67   4 M 69
;

proc mixed data=heights method=ml;
   ods output convergencestatus=cs;
   class Family Gender;
   model Height = Gender Family Family*Gender;
   repeated / type=un subject=family r;
run;

proc print data=cs;
   id status;
run;

The iteration history and convergence status table are displayed in Output 20.14. The convergence status data set is displayed in Output 20.15. The nonzero status indicates that there is a problem with the results.

Output 20.14: Iteration History and Convergence Status

The Mixed Procedure

Iteration History
Iteration Evaluations -2 Log Like Criterion
0 1 53.85649943  
1 2 59.68919298 0.21180916
2 1 56.39276784 0.47136098
3 1 50.81678998 6.59294844
4 1 47.19494707 92.10547924
5 1 44.30542619 804.32745158
6 1 40.83113890 11985.500198
7 1 37.08565532 323091.35113
8 1 32.24827115 692348728.58
9 1 30.79273954 4077848869.8
10 1 29.45204457 36428915810
11 1 28.13777320 367535832119
12 1 27.68391595 833511081505
13 1 27.58830036 991414360416
14 1 27.13471632 2.2672426E12
15 1 25.82899385 2.5300169E13
16 1 25.82606678 2.5434571E13
17 1 25.82582168 2.5451822E13
18 1 25.82541602 2.5468523E13
19 1 25.37222006 5.9337171E13
20 1 25.36073787 6.0621696E13
21 1 25.26509956 7.2484928E13
22 1 24.81204801 1.6959246E14
23 1 24.81196642 1.6959267E14
24 1 24.61066215 2.475507E14
25 1 24.60926992 2.4821615E14
26 1 24.15582290 5.8319199E14
27 1 24.06060182 6.9850403E14
28 1 22.75445239 8.2952665E15
29 20 22.75445239 8.2952665E15
30 20 22.75445239 8.2952665E15
31 20 22.75445239 8.2952665E15
32 20 22.75445239 8.2952665E15
33 20 22.75445239 8.2952665E15
34 20 22.75445239 8.2952665E15

WARNING: Stopped because of too many likelihood evaluations.


Output 20.15: Convergence Status Data Set

Status Reason pdG pdH
1 WARNING: Stopped because of too many likelihood evaluations. 1 1


The results converge in the following example:

proc mixed data=heights method=ml;
   ods output convergencestatus=cs;
   class Family Gender;
   model Height = Gender Family Family*Gender;
   repeated / type=ar(1) subject=family r;
run;

proc print data=cs;
   id status;
run;

The iteration history, convergence status table, and convergence status data set are displayed in Output 20.16.

Output 20.16: Iteration History and Convergence Status Table and Data Set

The Mixed Procedure

Iteration History
Iteration Evaluations -2 Log Like Criterion
0 1 53.85649943  
1 2 53.46585196 0.00000000

Convergence criteria met.

Status Reason pdG pdH
0 Convergence criteria met. 1 1


Last updated: December 09, 2022