PROC VARMAX writes incorrect variable names to the OUTHT= data set when more than 9 dependent variables are included in the model


PROC VARMAX writes incorrect variables names to the OUTHT= data set when 10 or more dependent variables are specified in the MODEL statement.

Notes similar to the ones shown below are written to the SAS log when this problem is encountered:

NOTE: Variable h1_1 already exists on file WORK.HTCCG, using h1_12 instead.
NOTE: Variable h1_1 already exists on file WORK.HTCCG, using h1_13 instead.
NOTE: Variable h2_1 already exists on file WORK.HTCCG, using h2_12 instead.

The variables referenced in the above notes should have been written to the OUTHT= data set as h1_10, h1_11, and h2_11, respectively. The problem is due to an indexing problem in the routine used to create the variable names.

There is no circumvention for this problem, other than to specify a model with fewer than 10 dependent variables.