os.plot | R Documentation |
Line and point plot showing optimally-scaled values on the vertical axis, original data values (assumed to be qualitative) on the horizontal axis.
os.plot(x.qual, os.data,
main.title = "Plot of optimal transformation")
x.qual |
Vector of data values, assumed to be qualitative. |
os.data |
Vector of optimally-scaled data values. |
main.title |
Main title for plot. |
Object of class trellis
.
plot.opscale
,
### 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)
### Plot of optimal scaling transformation
os.plot(op.scaled$qual, op.scaled$os)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.