opscale {optiscale} | R Documentation |
Optimal scaling of a data vector
Description
This function produces an object of class "opscale", containing a vector that is a least-squares approximation to a vector of quantitative values, subject to measurement constraints based upon a vector of qualitative data values.
Usage
opscale(x.qual, x.quant = seq(1:length(x.qual)), level = 1,
process = 1, na.impute = FALSE,
na.assign = TRUE, rescale = TRUE)
Arguments
x.qual |
A vector of data values, assumed to be qualitative. |
x.quant |
A vector of quantitative values. |
level |
Measurement level of |
process |
Measurement process of |
na.impute |
If |
na.assign |
If |
rescale |
If |
Details
The opscale()
function operationalizes a measurement theory
proposed by Young (1981) in order to facilitate an analysis strategy
called “Alternating Least Squares, Optimal Scaling”.
The optimal scaling transformation produces a vector (say, OS
)
that is a least-squares approximation to x.quant
, subject to
measurement constraints based upon x.qual
.
If x.qual
is nominal level, then the values in OS
are
the conditional means of x.quant
, within distinct categories
of x.qual
. If x.qual
is ordinal level, then the values in
OS
are the conditional means of x.quant
, adjusted to be
weakly monotonic to the values in x.qual
, using Kruskals (1964b)
monotonic transformation.
If x.qual
is discrete, then all data objects sharing a common value
in x.qual
must be assigned the same value in OS
.
If x.qual
is continuous, then data objects sharing a common value
in x.qual
can fall within a closed interval of values in OS
.
The continuous-discrete measurement process distinction corresponds to
Kruskals (1964a) primary and secondary approaches to ties.
Value
The opscale()
function returns an object of class "opscale"
containing a list with the following components:
qual |
The qualitative data vector, |
quant |
The vector of quantitative values, |
os |
The vector of optimally scaled values |
varname |
The name of the qualitative data vector, |
measlev |
The measurement level of the qualitative data vector specified
in the |
measproc |
The measurement process of the qualitative data vector specified
in the |
rescale |
Value of the |
os.raw.mean |
Mean of optimally scaled values before rescaling |
os.raw.sd |
Standard deviation of optimally scaled values before rescaling |
References
Kruskal, Joseph B. (1964a) “Multidimensional Scaling by Optimizing Goodness of Fit to a Nonmetric Hypothesis.” Psychometrika 29: 1-27.
Kruskal, Joseph B. (1964b) “Nonmetric Multidimensional Scaling: A Numerical Method.” Psychometrika 29: 115-129.
Young, Forrest W. (1981) “Quantitative Analysis of Qualitative Data.” Psychometrika 46: 357-388.
See Also
plot.opscale, print.opscale,
summary.opscale
Examples
### x1 is vector of qualitative data
### x2 is vector of quantitative values
x1 <- c(1,1,1,1,2,2,2,3,3,3,3,3,3)
x2 <- c(3,2,2,2,1,2,3,4,5,2,6,6,4)
### Optimal scaling, specifying that x1
### is ordinal-discrete
op.scaled <- opscale(x.qual=x1, x.quant=x2,
level=2, process=1)
print(op.scaled)
summary(op.scaled)