Previous Page | Next Page

The TCALIS Procedure

MATRIX Statement
MATRIX matrix-name <location> = parameter-spec <, location = parameter-spec ...> ;

In MATRIX statements, you specify fixed constants or free parameters for the elements of the model matrix referred by the matrix-name. The location indicates the starting row and column numbers of the matrix being specified and the parameter-spec is a list of free or fixed parameters for the elements in the matrix. You can also assign initial values for the free parameters in the parameter-spec list.

The MATRIX statement is a subsidiary model specification statement of the LISMOD and MSTRUCT modeling languages. You might need to use the MATRIX statements as many times as needed for specifying your model. However, you can use the MATRIX statement at most once for each distinct model matrix.

Valid Matrix Names for the LISMOD modeling language

There are 12 model matrices in the LISMOD model and they correspond to the following matrix-names for the LISMOD modeling language:

  • matrices in the measurement model for the y-variables

    _LAMBDAY_

    the matrix of regression coefficients of the y-variables on the eta-variables

    _NUY_

    the vector of intercept terms of the y-variables

    _THETAY_

    the error covariance matrix for the y-variables

  • matrices in the measurement model for the x-variables

    _LAMBDAX_

    the matrix of regression coefficients of the x-variables on the ksi-variables

    _NUX_

    the vector of intercept terms of the x-variables

    _THETAX_

    the error covariance matrix for the x-variables

  • matrices in the structural model

    _ALPHA_

    the vector of intercept terms of the eta-variables

    _BETA_

    the matrix of regression coefficients of the eta-variables on the eta-variables

    _GAMMA_

    the matrix of regression coefficients of the eta-variables on the ksi-variables

    _KAPPA_

    the mean vector for the ksi-variables

    _PHI_

    the covariance matrix for the ksi-variables

    _PSI_

    the error covariance matrix for the eta-variables

Valid Matrix Names for the MSTRUCT Modeling Language

the following matrix-names are valid for the MSTRUCT modeling language:

_COV_

the covariance matrix

_MEAN_

the mean vector

Specifying Locations in Model Matrices

There are four different ways to specify the starting location of the parameter matrix in question. Each way of specification leads to different continuation direction for assigning the parameters specified in the parameter-spec list. Assuming that there are () parameters specified in the parameter-spec list, the four different parameter assignment schemes due to different ways of starting location specification are described as follows:

[ i , j ]

The elements in the parameter-spec list correspond to the diagonally continued matrix elements [i,j], [i+1,j+1], ..., [i+n-1,j+n-1]. The number of elements is defined by the length of the parameter-spec and is eventually terminated by the matrix boundaries. If the parameter-spec list contains just one element (constant or variable), then it is assigned to the matrix element [i,j].

[ i ,  ]

In this type of row-wise specification, the elements in the parameter-spec list correspond to the horizontally continued matrix elements [i,1], [i,2], ..., [i,n]. For a rectangular or non-symmetric square matrix with k columns, the number of elements in parameter-spec should not exceed k. For a symmetric matrix, because you need to specify lower triangle elements only (upper triangular elements are duplicated from the lower triangle elements automatically), the number of elements in parameter-spec list for this type of row-wise specification should not exceed i.

[   , j ]

In this type of column-wise specification, the elements in the parameter-spec list correspond to the vertically continued matrix elements [i,j], [i+1,j], ..., [i+n-1,j]. For a rectangular or nonsymmetric square matrix, the value of i is 1. For a symmetric matrix, because you need to specify the lower triangular elements only (upper triangular elements are duplicated from the lower triangle elements automatically), the value of i in this type of column-wise specification is j.

[   ,   ]

Unspecified location: The elements of the parameter-spec list are assigned to all valid matrix positions starting at the element [1,1] and continuing row-wise, until reaching the last element of the parameter-spec list or the last valid matrix position. For a symmetric matrix, the valid positions are the elements in the lower triangle since the other triangle receives the symmetric allocation automatically.

When there is no starting location specified, it is equivalent to using [  ,  ] for an unspecified location.

Specifying Parameters in Model Matrices

The parameter-spec list contains numeric values or parameter names, or both, that are assigned to the matrix elements starting at a specified position and proceeding in a specified direction, which are determined by the way of the starting location specification.

The syntax for the parameter-spec list is the same as the parameter-spec list for the STD statement. There are three types of specification in the parameter-spec list, as described in the following.

  • Parameter names alone represent parameters in the model without starting values.

  • Parameter names followed by numbers inside a pair of parentheses represent parameters in the model with starting values provided in the parentheses.

  • Numbers alone represent fixed constant values for the corresponding matrix elements.

For example, consider the following parameter-spec list.

   0. 1. A2-A5 (1.4 1.9 2.5) 5.

The first two matrix elements are assigned with fixed values 0 and 1, respectively. The next element is a parameter named A2 with no initial value provided. The next three matrix elements are assigned with parameters A3, A4, and A5 with initial values 1.4, 1.9, and 2.5, respectively. The next matrix element is assigned with a constant 5. At first glance, the initial values in the parentheses are seemingly assigned to A2, A3, and A4, respectively. However, because A2A5 is a shorthand of four consecutive parameters, the preceding parameter-spec list is equivalent to:

   0. 1. A2 A3 A4 A5 (1.4 1.9 2.5) 5.

With this explicit specification, it is clearer to see that the initial values in the parentheses are assigned to parameters A3A5, respectively.

If your model contains many unconstrained parameters and it is too cumbersome to find different parameter names, you can specify all those parameters by the same prefix name. A prefix name is a short name called "root" followed by double underscores '__'. Whenever a prefix name is encountered, the TCALIS procedure generates a parameter name by appending a unique integer to the root. Hence, the prefix name should have few characters so that the generated parameter name is not longer than thirty-two characters. For example, consider the following parameter-spec list.

   0. 1. 4 * A__ (1.4 1.9 2.5) 5.

If the prefix name A__ has not been specified previously, then A1, A2, A3, and A4 are generated by the 4 * A__ syntax. However, if the prefix name A__ has been specified, say, twice, previously, then A3, A4, A5, and A6 are generated by the same 4 * A__ syntax.

To avoid unintentional equality constraints, the prefix names should not coincide with explicitly defined parameter names. For example, consider the following specification.

   matrix _mean_ = B1 B2 2 * B__; 

If the prefix name B__ has not been specified previously, then B1 and B2 are generated for the third and the fourth elements, respectively, of the mean vector. However, these two parameter names are the same as those assigned explicitly to the first and the second elements of the mean vectors, resulting to two equality constraints that might not have been intended.

Modifying a Parameter Specification from a Reference Model

If you define a new LISMOD or MSTRUCT model by using a reference (or base) model in the REFMODEL statement, in some situations you might want to modify some parameter specifications from the MATRIX statement of the reference model before transferring the specifications to the new model. If you want to change a particular MATRIX parameter specification from the reference model, you can simply put the corresponding parameter location with a new parameter specification in the new model. If you want to delete a particular parameter location from the reference model, you can put that parameter location with the missing value '.' in the new model. For example, suppose you are defining a new LISMOD model by using the REFMODEL statement and the covariance between variables F1 and F2 is defined as a fixed or free parameter in the reference model. If you do not want this parameter specification to be copied into your new model, you can use the following specification in the new model:

   matrix _PHI_  F1 F2 = .;

Notice that the missing value syntax is valid only when you use the REFMODEL statement. See the section Modifying a LISMOD Model from a Reference Model for a more detailed example of LISMOD model respecification. See the section Modifying an MSTRUCT Model from a Reference Model for a more detailed example of MSTRUCT model respecification.


Note: This procedure is experimental.

Previous Page | Next Page | Top of Page