The TCALIS Procedure |
OUTFILES Statement |
Use the OUTFILES statement when you need to output multiple-group or multiple-model information to output files in a complex way. In each OUTFILES statement, each possible file_option should appear no more than once. However, as needed, you can use the OUTFILES statement more than once. For example, suppose you want to create two OUTWGT= files for different sets of groups. You can specify the OUTFILES statement twice, as shown in the following specification:
outfiles outwgt=file1 [group=1,2]; outfiles outwgt=file2 [group=3,4];
In the first OUTFILES statement, the weights for groups and are output to the file file1. In the second OUTFILES statement, the weights for groups and are output to the file file2.
When the OUTMODEL=, OUTSTAT=, or OUTWGT= option is intended for all groups or models, you can simply specify the option in the PROC TCALIS statement. Only when you need to output the group (model) information from more than one group (model), but not all groups (models), to a single output file does the use the OUTFILES statement become necessary. For example, consider the following specification:
proc tcalis method=gls; outfiles outmodel=outmodel [model=1,3] outwgt=outwgt [group=1,2] outstat=outstat [group=2,3]; group 1 / data=g1; group 2 / data=g2; group 3 / data=g3 outwgt=outwgt3; model 1 / group=1; factor N=3; model 2 / group=2; factor N=2; model 3 / group=3; factor N=3; run;
You fit three different factor models to three groups: model 1 for group 1, model 2 for group 2, and model 3 for group 3. In the OUTFILES statement, you output model information from models 1 and 3 to an output file named outmodel, weight matrices from groups 1 and 2 to outwgt, and statistics from groups 2 and 3 to outstat. In each of these output files, you have information from more than one (but not all) groups or models. In the GROUP statement for group 3, you have another OUTWGT= file named outwgt3 for group 3 alone.
Note that you cannot specify the preceding output file organization by using the following statements:
proc tcalis method=gls; group 1 / data=g1 outwgt=outwgt; group 2 / data=g2 outwgt=outwgt outstat=outstat; group 3 / data=g3 outwgt=outwgt3 outstat=outstat; model 1 / group=1 outmodel=outmodel; factor N=3; model 2 / group=2; factor N=2; model 3 / group=3 outmodel=outmodel; factor N=3; run;
This specification will not work because SAS forbids the repeated specification of the same output file in the same PROC TCALIS run. That is, you cannot specify OUTWGT=outwgt, OUTSTAT=outstat, or OUTMODEL=outmodel more than once in the PROC TCALIS run without causing file invocation problems (however, multiple specification of the same input file is not a problem).
The OUTFILES statement is intended for arranging output files in a complex way. The use of the OUTFILES statement is unnecessary in the following situations:
If you have a single-sample analysis, you do not need to use the GROUP statement. As a result, you can simply use the OUTSTAT= or OUTWGT= options in the PROC TCALIS statement for specifying the output destinations. Therefore, the OUTFILES statement is not needed.
If you have a single model in your analysis, you do not need to use the MODEL statement. As a result, you can simply use the OUTMODEL= options in the PROC TCALIS statement for specifying the output destination. Therefore, the OUTFILES statement is not needed.
If you have multiple groups or multiple models in your analysis and information for all groups or models is output to the same file, you do not need to use the OUTFILES statement. You can simply use the OUTSTAT=, OUTWGT=, or OUTMODEL= options in the PROC TCALIS statement because the output file information is automatically propagated from the PROC TCALIS statement to the groups or models.
If you have multiple groups or multiple models in your analysis and each group or model has a unique output data file destination (including cases where some groups or models might not have any output files), you do not need to use the OUTFILES statement. You can simply specify the OUTSTAT=, OUTWGT=, or OUTMODEL= options in the GROUP or MODEL statements.
Note: This procedure is experimental.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.