shepard: Shepard diagram for opscale

Description Usage Arguments Value Warning Examples

Description

Graph showing data (assumed quantitative) on vertical axis, optimally-scaled data on horizontal axis.

Usage

1
2
3
shepard(x, ...)

shep.plot(x.quant, os.data, main.title = "Shepard Diagram")

Arguments

x

An object of class opscale

x.quant

Data vector, assumed to be quantitative.

os.data

Optimally-scaled data.

main.title

Main title for graph.

...

Ignored

Value

shepard() and shep.plot() both produce an object of class trellis

Warning

If using shep.plot(), the Shepard diagram should be created using "raw" optimally scaled values. That is, the OS values should NOT be rescaled to the mean and standard deviation of the original qualitative data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  ###   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, optimally scaled
  ###   values are not rescaled
     op.scaled <- opscale(x.qual=x1, x.quant=x2,   
                  level=2, process=1,
                  rescale=FALSE)              
  ###   Create Shepard diagram
     shepard(op.scaled)
  ###   Same results are produced by:
     shep.plot(op.scaled$quant, op.scaled$os)       

Example output

Loading required package: lattice

optiscale documentation built on Feb. 3, 2021, 9:06 a.m.