Contents - Index


TRANSFORM>RECODE  

PURPOSE Change ranges of matrix values to new values.

DESCRIPTION The routine allows the user to change values or a range of values in a matrix to a new value.  Up to 5 values or ranges can be recoded.

PARAMETERS
Input dataset
Name of dataset to be recoded. Data type: Matrix.

Rows to recode (Default = All)
Rows to be recoded are specified by a list. Each row number is listed separated by a comma or space. The keywords TO, FIRST and LAST are permissible. Hence FIRST 3, 5 TO 7, 10, 12 would give row numbers 1, 2, 3, 5, 6, 7, 10 and 12. ALL gives all possible rows. Lists kept in a UCINET dataset can be used. Enter the filename followed by ROW (or COLUMN) and a number to specify which row or column of the file to use. The list must be specified using a binary vector where a 1 in position k indicates that vertex k is a member of the list, a zero indicates that k is not a member.

Cols to recode (Default = All)
Columns to be recoded are specified by a list. Each column number is listed separated by a comma or space. The keywords TO, FIRST and LAST are permissible. Hence FIRST 3, 5 TO 7, 10, 12 would give column numbers 1, 2, 3, 5, 6, 7, 10 and 12. ALL gives all possible columns. Lists kept in a UCINET dataset can be used. Enter the filename followed by ROW (or COLUMN) and a number to specify which row or column of the file to use. The list must be specified using a binary vector where a 1 in position k indicates that vertex k is a member of the list, a zero indicates that k is not a member.

      
Mats (levels) to recode (Default = All)
Matrices to be recoded are specified by a list. Each matrix number is listed separated by a comma or space. The keywords TO, FIRST and LAST are permissible. Hence FIRST 3, 5 TO 7, 10, 12 would give matrix numbers 1, 2, 3, 5, 6, 7, 10 and 12. ALL gives all possible matrices. Lists kept in a UCINET dataset can be used. Enter the filename followed by ROW (or COLUMN) and a number to specify which row or column of the file to use. The list must be specified using a binary vector where a 1 in position k indicates that vertex k is a member of the list, a zero indicates that k is not a member.

Include diagonal values: (Default = No).
Yes means that diagonal values are recoded.
No ignores the diagonal in the recoding.


Five boxes of the form
values             to            are recoded as          

If the values x, y and z are entered so that the completed line reads

values x to y are recoded as z

then all values of the matrix in the range from x to y inclusive are changed to the value z. To change a single value set both x and y to the value. Note that the value na can be used for missing values.

 
Output dataset: (Default = 'Recode').
Name of file which contains recoded matrix.


LOG FILE Recoded matrix.

TIMING O(N^2).

COMMENTS None.

REFERENCES None.