Chapter Contents |
Previous |
Next |

Language Reference |

**OPSCAL(***mlevel, quanti<, qualit>***)**

The inputs to the OPSCAL function are as follows:

*mlevel*- specifies a scalar that has one of two values.
When
*mlevel*is 1 the*qualit*matrix is at the nominal measurement level; when*mlevel*is 2 it is at the ordinal measurement level. *quanti*- specifies an
*m*×*n*matrix of quantitative information assumed to be at the interval level of measurement. *qualit*- specifies an
*m*×*n*matrix of qualitative information whose level of measurement is specified by*mlevel*. When*qualit*is omitted,*mlevel*must be 2. When omitted, a temporary*qualit*is constructed that contains the integers from 1 to*n*in the first row, from*n*+1 to 2*n*in the second row, from 2*n*+1 to 3*n*in the third row, and so forth, up to the integers (*m*-1)*n*to*mn*in the last(*m*th) row. Note that you cannot specify*qualit*as a character matrix.

- is a least-squares fit to the
quantitative data in
*quanti* - preserves the qualitative
measurement level of
*qualit*

When *qualit* is at the nominal level of measurement,
the optimal scaling transformation result is a least-squares
fit to *quanti*, given the restriction that the
category structure of *qualit* must be preserved.
If element *i* of *qualit* is in category *c*, then
element *i* of the optimum scaling transformation result is
the mean of all those elements of *quanti* that correspond
to elements of *qualit* that are in category *c*.

For example, consider these statements:

quanti={5 4 6 7 4 6 2 4 8 6}; qualit={6 6 2 12 4 10 4 10 8 6}; os=opscal(1,quanti,qualit);The resulting vector

OS 1 row 10 cols (numeric) 5 5 6 7 3 5 3 : 5 8 5The optimal scaling transformation result is said to preserve the nominal measurement level of

When *qualit* is at the ordinal level of measurement,
the optimal scaling transformation result is a least-squares
fit to *quanti*, given the restriction that the
ordinal structure of *qualit* must be preserved.
This is done by determining blocks of elements of
*qualit* so that if element *i* of *qualit* is
in block *b*, then element *i* of the result is the mean
of all those *quanti* elements corresponding to
block *b* elements of *qualit* so that the means are
(weakly) in the same order as the elements of *qualit*.
For example, consider these statements:

quanti={5 4 6 7 4 6 2 4 8 6}; qualit={6 6 2 12 4 10 4 10 8 6}; os=opscal(2,quanti,qualit);The resulting vector

OS 1 row 10 cols (numeric) 5 5 4 7 4 6 4 : 6 6 5This transformation preserves the ordinal measurement level of

quanti={5 3 6 7 5 7 8 6 7 8}; os=opscal(2,quanti);These statements imply that

qualit={ 1 2 3 4 5 6 7 8 9 10} ;which means that the resulting vector has the values

OS 1 row 10 cols (numeric) 4 4 6 6 6 7 7 : 7 7 8

Chapter Contents |
Previous |
Next |
Top |

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