# NOT RUN {
reliability(psychTools::ability) #an example of finding reliability for all items
plot(reliability(psychTools::ability.keys,psychTools::ability)) #versus all and subsets
reliability(psychTools::bfi.keys,psychTools::bfi)
# }
# NOT RUN {
#this takes a few seconds but shows nice graphic displays
spi.rel <- reliability(psychTools::spi.keys,psychTools::spi,hist=TRUE) #graph them
spi.rel #show them
#plot them using plot.reliability
plot(spi.rel) #draw the density distrbutions
plot(spi.rel,split=FALSE) #don't draw the split half density distribution
plot(spi.rel,omega=FALSE) # don't add omega values to the diagram
#or do this without the densities
#plot the first three values in a dot chart
error.dots(spi.rel$result.df[,1],sort=FALSE, xlim=c(.3,1),head=16,tail=16,
main = expression(paste(omega[h], ~~~~ alpha,~~~~ omega[t])))
#plot the omega_h values
error.dots(spi.rel$result.df[,2],sort=FALSE,pch=2,xlim=c(.3,1),head=16,tail=16,
main="",labels="",add=TRUE)#add the alpha values
error.dots(spi.rel$result.df[,3],sort=FALSE, xlim=c(.3,1),head=16,tail=16,
pch=3,labels="", main="",add=TRUE) #and the omega_t values
#or, show the smallest and greatest split half, as well as alpha
error.dots(spi.rel$result.df[,4],sort=FALSE, xlim=c(.3,1),head=16,tail=16,
main = expression(paste(beta, ~~~~ alpha,~~~~ glb)))
error.dots(spi.rel$result.df[,5],sort=FALSE,pch=5,xlim=c(.3,1),head=16,tail=16,
main="",labels="",add=TRUE)#add the GLB values
error.dots(spi.rel$result.df[,2],sort=FALSE,pch=2,xlim=c(.3,1),head=16,tail=16,
main="",labels="",add=TRUE)#add the alpha values
# }
Run the code above in your browser using DataLab