Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CALIS Procedure

SAS Program Statements

This section lists the program statements used to express the linear and nonlinear constraints on the parameters and documents the differences between program statements in PROC CALIS and program statements in the DATA step. The very different use of the ARRAY statement by PROC CALIS is also discussed. Most of the program statements that can be used in the SAS DATA step also can be used in PROC CALIS. Refer to SAS Language Reference: Dictionary for a description of the SAS program statements. You can specify the following SAS program statements to compute parameter constraints with the CALIS procedure:

           ABORT ;
           CALL name < ( expression < , expression ... > ) > ;
           DELETE;
           DO < variable = expression < TO expression> < BY expression>
                      <, expression <
TO expression> < BY expression> ... > >
                      <
WHILE expression>
                      <
UNTIL expression> ;

           END;
           GOTO statement-label ;
           IF expression;
           IF expression THEN program-statement ;
                      ELSE program-statement ;

           variable = expression ;
           variable+expression ;
           LINK statement-label ;
           PUT <variable> <=> < ... > ;
           RETURN ;
           SELECT < ( expression ) > ;
           STOP;
           SUBSTR ( variable, index, length ) = expression ;
           WHEN (expression) program-statement ;
                      OTHERWISE program-statement ;

For the most part, the SAS program statements work the same as they do in the SAS DATA step as documented in SAS Language Reference: Concepts. However, there are several differences that should be noted.

You can specify one or more PARMS statements to define parameters used in the program statements that are not defined in the model matrices (MATRIX, RAM, LINEQS, STD, or COV statement).

Parameters that are used only on the right-hand side of your program statements are called independent, and parameters that are used at least once on the left-hand side of an equation in the program code are called dependent parameters. The dependent parameters are used only indirectly in the minimization process. They should be fully defined as functions of the independent parameters. The independent parameters are included in the set X of parameters used in the minimization. Be sure that all independent parameters used in your program statements are somehow connected to elements of the model matrices. Otherwise the minimization function does not depend on those independent parameters, and the parameters vary without control (since the corresponding derivative is the constant 0). You also can specify the PARMS statement to set the initial values of all independent parameters used in the program statements that are not defined as elements of model matrices.

ARRAY Statement

ARRAY arrayname <(dimensions)>< $ ><variables and constants> ;
The ARRAY statement is similar to, but not the same as, the ARRAY statement in the DATA step. The ARRAY statement is used to associate a name with a list of variables and constants. The array name can then be used with subscripts in the program to refer to the items in the list.

The ARRAY statement supported by PROC CALIS does not support all the features of the DATA step ARRAY statement. With PROC CALIS, the ARRAY statement cannot be used to give initial values to array elements. Implicit indexing variables cannot be used; all array references must have explicit subscript expressions. Only exact array dimensions are allowed; lower-bound specifications are not supported. A maximum of six dimensions is allowed.

On the other hand, the ARRAY statement supported by PROC CALIS does allow both variables and constants to be used as array elements. Constant array elements cannot be changed. Both the dimension specification and the list of elements are optional, but at least one must be given. When the list of elements is not given or fewer elements than the size of the array are listed, array variables are created by suffixing element numbers to the array name to complete the element list.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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