plot.alpha: Alpha related plot

Description Usage Arguments Author(s) References Examples

View source: R/Cronbach.R

Description

Generate plot related to alpha. Three plot can be generated. (1) The weight plot will plot the weight associated with alpha calculation. (2) Profile plot will plot the cases with smallest weights and the average value. (3) The diagnostic plot plots the alpha according to different values of the tuning parameter.

Usage

1
2
## S3 method for class 'alpha'
plot(x, type="weight", profile=5, interval=0.01,center=TRUE,pos="topright",...)

Arguments

x

Results from the function cronbach.

type

Three types of plots can be generated. type="weight" generates the plot of weight of each case. type="profile" generates a profile plot for the smallest weight. type="weight" generates the diagnostic plot for varphi with an interval of .01.

profile

Number of cases used on the profile plot. At most 10.

interval

The interval used in the diagnostic plot. The default is 0.01.

center

Whether to center the data in the profile plot.

pos

Position of legend. If pos=NULL, no legend is plotted.

...

Options can be passed to the plot function.

Author(s)

Zhiyong Zhang and Ke-Hai Yuan

References

Zhang, Z. & Yuan, K.-H. (2013). Robust Cronbach's alpha.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(holzinger)
spatial<-holzinger[, c('visual', 'cubes', 'paper', 'lozenge', 'paperrev','flagssub')]
verbal<-holzinger[, c('general', 'paragrap', 'sentence', 'wordc', 'wordm')]
speed<-holzinger[, c('add', 'code', 'counting', 'straight')]
memory<-holzinger[, c('wordr', 'numberr', 'figurer', 'object', 'numberf', 'figurew')]

alpha.spatial<-cronbach(spatial)
## diagnostic plot
plot(alpha.spatial, type='d')

## alpha with varphi=.01 & standard error
alpha.spatial<-cronbach(spatial, varphi=.01, se=TRUE)
## confidence interval
summary(alpha.spatial)

## weight plot
plot(alpha.spatial)
# or
plot(alpha.spatial, type='w')

## profile plot
plot(alpha.spatial, type='p')

alpha documentation built on May 2, 2019, 6:11 p.m.