PDF Psych Manual Compress
PDF Psych Manual Compress
PDF Psych Manual Compress
URL http://personality-project.org/r/psych
http://personality-project.org/r/psych-manual.pdf
NeedsCompilation no
Depends R (>= 2.10)
R topics documented:
documented:
00.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
affect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Bechtoldt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
bestScales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
bfi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1
2 R topics documented:
bi.bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
biplot.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
block.random . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
blot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
bock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
burt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
circ.tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
cities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
cluster.fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
cluster.loadings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
cluster.plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
cluster2keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
cohen.kappa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
comorbidity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
cor.ci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
cor.plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
cor.smooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
cor.wt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
cor2dist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
corFiml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
corr.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
correct.cor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
cortest.bartlett . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
cortest.mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
cosinor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
count.pairwise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
cta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
cubits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
cushny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
densityBy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
describe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
describeBy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
df2latex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
draw.tetra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
dummy.code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Dwyer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
eigen.loadings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
epi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
epi.bfi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
error.bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
error.bars.by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
error.crosses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
errorCircles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
fa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
fa.diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
fa.extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
fa.multi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
fa.parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
fa.sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
factor.congruence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
R topics documented: 3
factor.fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
factor.model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
factor.residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
factor.rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
factor.scores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
factor.stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
factor2cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
fisherz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
galton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
geometric.mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
glb.algebraic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Gleser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Gorsuch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Harman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Harman.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Harman.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Harman.political . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
harmonic.mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
headTail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
heights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
ICC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
iclust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
ICLUST.cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
iclust.diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
ICLUST.graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
ICLUST.rgraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
ICLUST.sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
income . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
interp.median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
iqitems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
irt.1p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
irt.fa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
irt.item.diff.rasch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
irt.responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
kaiser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
KMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
logistic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
lowerUpper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
make.keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
mardia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
mat.sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
matrix.addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
mediate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
mixed.cor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
msq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
mssd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
multi.hist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
neo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
omega . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
omega.graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
outlier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
p.rep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
4 R topics documented:
paired.r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
pairs.panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
parcels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
partial.r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
peas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
phi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
phi.demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
phi2tetra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
plot.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
polar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
polychor.matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
predict.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
principal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
print.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Promax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
psych.misc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
r.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
rangeCorrection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
read.clipboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
rescale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
residuals.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
reverse.code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
sat.act . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
scaling.fits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
scatter.hist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Schmid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
schmid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
score.alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
score.irt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
s core.multiple.choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
scoreItems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
scoreOverlap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
scrub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
SD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
setCor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
sim.anova . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
sim.congeneric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
sim.hierarchical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
sim.item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
sim.multilevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
sim.structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
sim.VSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
simulation.circ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
smc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
spider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
splitHalf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
statsBy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
structure.diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
structure.list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
superMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
table2matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
00.psych 5
test.psych . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
tetrachoric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
thurstone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
tr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Tucker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
vegetables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
VSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
VSS.parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
VSS.plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
VSS.scree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
winsor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
withinBetween . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Yule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Index 332
Description
Functions to generate simulated data with particular structures include sim.circ (for circumplex
structures), sim.item (for general structures) and sim.congeneric (for a specific demonstration
of congeneric measurement). The functions sim.congeneric and sim.hierarchical can be used
to create data sets with particular
particular structural
structural properties.
properties. A more general form for all of these is
sim.structural for gener
generating
ating general
general structural
structural models.
models. These
These are discussed
discussed in more detail in
the vignette (psych_for_sem).
Functions to apply various standard statistical tests include p.rep and its variants for testing the
probability of replication, r.con for the confidence intervals of a correlation, and r.test to test
single, paired, or sets of correlations.
In order to study diurnal or circadian variations in mood, it is helpful to use circular statistics. Func-
tions to find the circular mean ( circadian.mean), circular (phasic) correlations (circadian.cor)
and the correlation between linear variables and circular variables ( circadian.linear.cor) sup-
plement a function to find the best fitting phase angle ( cosinor) for measures taken with a fixed
period (e.g., 24 hours).
The most recent development version of the package is always available for download as a source
file from the repository at http://personality-project.org/r/src/c
http://personality-project.org/r/src/contrib/ontrib/.
Details
number of factors.
number factors. Other procedures (VSS.scree, VSS.parallel, fa.parallel, and MAP) also
procedures
address this question.
3) What are the best composites to form? Although this may be answered using principal compo-
nents (principal), principal axis (factor.pa) or minimum residual (factor.minres) factor anal-
ysis (all part of the fa function) and to show the results graphically ( fa.diagram), it is sometimes
fa.diagram)
more useful to address this question using cluster analytic techniques. Previous versions of ICLUST
(e.g., Revelle, 1979) have been shown to be particularly successful at forming maximally consistent
and independent
independent item composites. Graphical output from ICLUST.graph uses the Graphviz dot
composites. Graphical
language and allows one to write files suitable for Graphviz. If Rgraphviz is available, these graphs
can be done in R.
Graphical organizations of cluster and factor analysis output can be done using cluster.plot
which plots items by cluster/factor loadings and assigns items to that dimension with the highest
loading.
4) How well does a particular item composite reflect a single construct? This is a question of relia-
bility and general factor saturation. Multiple solutions for this problem result in (Cronbach’s) alpha
(alpha, score.items), (Revelle’s) Beta ( ICLUST), and (McDonald’s) omega (both omega hierar-
chical and omega total). Additional reliability estimates may be found in the guttman function.
This can also be examined by applying irt.fa Item Response Theory techniques using factor
analysis of the tetrachoric or polychoric correlation matrices and converting the results into the
standard
standard two parameter
parameter parameteri
parameterizatio
zation
n of item difficulty
difficulty and item discrimina
discrimination.
tion. Inform
Information
ation
functions for the items suggest where they are most effective.
5) For some applications, data matrices are synthetically combined from sampling different items
for different
different people. So called
called Synth
Synthetic
etic Aperture Personal
Personality
ity Assessem
Assessement
ent (SAPA)
(SAPA) techniques
techniques
allow the formation of large correlation or covariance matrices even though no one person has
taken all of the items. To analyze such data sets, it is easy to form item composites based upon the
covariance matrix of the items, rather than original data set. These matrices may then be analyzed
using a number
number of functions
functions (e.g., cluster.cor, factor.pa, ICLUST, principal, mat.regress,
and factor2cluster.
6) More typically, one has a raw data set to analyze. alpha will report several reliablity estimates
as well as item-whole correlations for items forming a single scale, score.items will score data
sets on multiple scales, reporting the scale scores, item-scale and scale-scale correlations, as well
as coefficient
coefficient alpha, alpha-1
alpha-1 and G6+. Using a ‘keys’ matrix (creat ed by make.keys or by hand),
(created
scales
scales can have
have ov
overl
erlapp
apping
ing or indepe
independe
ndent
nt ite
items.
ms. score.multiple.choice score
scoress multiple
multiple choice
choice
items or converts multiple choice items to dichtomous (0/1) format for other functions.
An additi
additiona
onall set of functi
functions
ons gen
genera
erate
te simula
simulated
ted dat
dataa to meet
meet certai
certain
n str
struct
uctura
urall pro
proper
pertie
ties.
s. sim.anova
produces data simulating a 3 way analysis of variance (ANOVA) or linear model with or with out
repeated measures. sim.item creates simple structure data, sim.circ will produce circumplex
structured data, sim.dichot produces circumplex or simple structured data for dichotomous items.
These item structures are useful for understanding the effects of skew,
skew, differential item endorsement
on factor and cluster analytic soutions. sim.structural will produce correlation matrices and data
matrices to match general structural models. (See the vignette).
When examining personality items, some people like to discuss them as representing items in a
two dimensional space with a circumplex structure. Tests of circumplex fit circ.tests have been
developed. When representing items in a circumplex, it is convenient to view them in polar coor-
dinates.
Additional functions for testing the difference between two independent or dependent correlation
r.test, to find the phi or Yule coefficients from a two by table, or to find the confidence interval
of a correlation coefficient.
Ten data sets are included: bfi represents 25 personality items thought to represent five factors of
personality, iqitems has 14 multiple choice iq items. sat.act has data on self reported test scores
8 00.psych
Pack
Packagage:
e: psyc
psychh
Type: Package
Version
ersion:: 1.4.3
1.4.3
Dat
atee: 20
2014
14–M
–Maarc
rch–
h–25
25
License:
Lice nse: GPL version
version 2 or new
newer
er
Index:
psych A package for personality, psychometric, and psychological research.
read.clipboard.upper
describe shortcut
Basic for reading
descriptiv
descriptive upper triangular
e statistics useful for matrices from the clipboard
psychometrics clipboard
describe.by Find summary statistics by groups
statsBy Find summary statistics by a grouping variable, including within and between correlation matrices
headtail combines the head and tail functions for showing data sets
pairs.panels SPLOM and correlations for a data matrix
corr.test Correlations, sample sizes, and p values for a data matrix
cor.plot graphically show the size of correlations in a correlation matrix
multi.hist Histograms and densities of multiple variables arranged in matrix form
skew Calculate skew for a vector,
vector, each column of a matrix, or data.frame
kurtosi Calculate kurtosis for a vector, each column of a matrix or dataframe
geometric.mean Find the geometric mean of a vector or columns of a data.frame
harmonic.mean Find the harmonic mean of a vector or columns of a data.frame
error.bars Plot means and error bars
error.bars.by Plot means and error bars for separate groups
error.crosses Two way error bars
interp.median Find the interpolated median, quartiles, or general quantiles.
rescale Rescale data to specified mean and standard deviation
table2df Convert
Convert a two dimensional table of counts to a matrix or data frame
fa Combined function for principal axis, minimum residual, weighted least squares,
and maximum likelihood factor analysis
factor.pa Do a principal Axis factor analysis (deprecated)
factor.minres Do a minimum residual factor analysis (deprecated)
factor.wls Do a weighted least squares factor analysis (deprecated)
fa.graph Show the results of a factor analysis or principal components analysis graphically
fa.diagram Show the results of a factor analysis without using Rgraphviz
00.psych 9
alpha Find coefficient alpha and Guttman Lambda 6 for a scale (see also score.items)
score.items)
guttman 8 different measures of reliability (6 from Guttman (1945)
omega Calculate the omega estimates of reliability (requires the GPArotation
GPArotation package)
omegaSem Calculate the omega estimates of reliability using a Confirmatory model (requires the sem package)
ICC Intraclass correlation coefficients
score.items Combine items into multiple scales and find alpha
alpha
glb.algebraic The greates lo
lower
wer bound found by an algebraic
algebraic solution (requires Rcsdp).
Rcsdp). Written by Andreas Moeltner
alpha Find coefficient alpha and Guttman Lambda 6 for a scale (see also score.items
score.items))
make.keys Create the keys file for score.items or cluster
cluster.cor
.cor
correct.cor Correct a correlation matrix for unreliability
count.pairwise Count the number of complete
complete cases when doing pair wise correlations
cluster.cor find correlations of composite variables from larger matrix
10 00.psych
plot.psych A call to plot various types of output (e.g. from irt.fa, fa, omega, iclust
cor.plot A heat map display of correlations
spider Spider and radar plots (circular displays of correlations)
circadian.cor Find the correlation with e.g., mood and time of day
circadian.linear.cor Correlate a circular value
value with a linear value
circadian.mean Find the circular mean of each column of a a data set
cosinor Find the best fitting phase angle for a circular data set
Miscellaneous functions
comorbidity Convert
Convert base rate and comorbity to phi, Yule and tetrachoric
df2latex Conv
Convert
ert a data.frame or matrix to a LaTeX
LaTeX table
dummy.code Convert
Convert categorical data to dummy codes
fisherz Apply the Fisher r to z transform
fisherz2r
ICC Apply the correlation
Intraclass Fisher z to coefficients
r transform
cortest.mat Test for equality of two matrices (see also cortest.normal, cortest.jennrich )
cortest.bartlett Test whether a matrix is an an identity
identity matrix
paired.r Test for the difference of two paired or two independent correlations
r.con Confidence intervals for correlation coefficients
r.test Test of significance of r, differences between rs.
p.rep The probability of replication given a p, r, t, or F
phi Find the phi coefficient of correlation from a 2 x 2 table
phi.demo Demonstrate the problem of phi coefficients with varying cut points
phi2poly Given a phi coefficient, what is the polychoric correlation
phi2poly.matrix Given a phi coefficient, what
what is the polychoric correlation
correlation (works on matrices)
matrices)
polar Conv
Convert
ert 2 dimensional factor loadings to polar coordinates.
scaling.fits Compares alternative scaling solutions and gives goodness of fits
scrub Basic data cleaning
tetrachor Finds tetrachoric correlations
thurstone Thurstone Case V scaling
tr Find the trace of a square matrix
wkappa weighted and unweighted versions of Cohen’
Cohen’ss kappa
Yule Find the Yule Q coefficient of correlation
Yule.inv What is the two by two table that produces a Yule Q with set marginals?
Yule2phi What is the phi coefficient corresponding to a Yule Q with set marginals?
Yule2tetra Convert
Convert one or a matrix of Yule coefficients to tetrachoric coefficients.
Functions that are under development and not recommended for casual use
Note
Development versions (source code) of this package are maintained at the repository http://
personality-project.org/r along with further documentation. Specify that you are download-
ing a source package.
Some functions require other packages. Specifically,
Specifically, omega and schmid require the GP
GPArotation
Arotation
package, ICLUST.rgraph and fa.graph require Rgraphviz but have alternatives using the diagram
functions. i.e.:
function requires
omega GPArotation
schmid GPArotation
poly.mat polychor
phi2poly polychor
polychor.matrix polychor
ICLUST.rgraph Rgraphviz
fa.graph Rgraphviz
structure.graph Rgraphviz
glb.algebraic Rcsdp
Author(s)
William Revelle
Department of Psychology
Northwestern University
ability 13
Evanston, Illiniois
http://personality-project.org/revelle.html
References
A general guide to personality theory and research may be found at the personality-project http:
//personality-project.org. See also the short guide to R at http://personality-project.
org/r. In addition, see
Re
Reve
velle
lle,, W. (in prepar
preparati
ation)
on) An Introd
Introduct
uction
ion to Psycho
Psychomet
metric
ric Theory
Theory wit
with
h applic
applicati
ations
ons in R. Spr
Spring
inger
er..
at http://personality-project.org/r/book/
Examples
#See
#See the separa
separate
te man pages
#to test most
most of the psych packa
package
ge run the fol
follow
lowing
ing
#test.psych()
Description
16 multiple choice ability items 1525 subjects taken from the Synthetic Aperture Personality As-
sessment (SAPA) web based personality assessment project are saved as iqitems. Those data are
shown as examples of how to score multiple choice tests and analyses of response alternatives.
When scored correct or incorrect, the data are useful for demonstrations of tetrachoric based factor
analysis irt.fa and finding tetrachoric correlations.
Usage
data(iqitems)
Format
A dataitem
is the frame with 1525
number fromobservations
SAPA. on the following 16 variables. The number following the name
Details
16 items were sampled from 80 items given as part of the SAPA (http://sapa-project.org)
project (Revelle, Wilt and Rosenthal, 2009; Condon and Revelle, 2014) to develop online measures
of ability.
ability. These
These 16 items reflect
reflect four lower order factors
factors (verbal reasoning,
reasoning, letter series,
series, matrix
reasoning, and spatial rotations. These lower level factors all share a higher level factor (’g’).
This data set may be used to demonstrate item response functions, tetrachoric correlations, or
irt.fa as well as omega estimates of of reliability and hierarchical structure.
In addition, the data set is a good example of doing item analysis to examine the empirical response
probabilities of each item alternative as a function of the underlying latent trait. When doing this,
it appears that two of the matrix reasoning problems do not have monotonically increasing trace
lines for the probability
probability correct
correct.. At moderately
moderately high ability (theta = 1) there is a decrease
decrease in the
probability correct from theta = 0 and theta = 2.
Source
The example data set is taken from the Synthetic Aperture Personality Assessment personality
and ability test at http://sapa-project.org. The data were collected with David Condon from
8/08/12 to 8/31/12.
References
Revelle,
Revelle, Willia
William,
m, Wilt, Joshua,
Joshua, and Rosentha
Rosenthal,
l, Allen (2010)
(2010) Perso
Personalit
nality
y and Cogn
Cognition:
ition: The Perso
Personalit
nality-
y-
Condon, David and Revelle, William, (2014) The International Cognitive Ability Resource: Devel-
opment and initial validation of a public-domain measure. Intelligence, 43, 52-64.
Examples
data(ability)
#not
#not run
# ability.irt
ability.irt <- irt.f
irt.fa(abil
a(ability)
ity)
# ability.scor
ability.scores
es <- score.
score.irt(ab
irt(ability.
ility.irt,ab
irt,ability
ility)
)
affect 15
Description
A recurring question in the study of affect is the proper dimensionality and the relationship to
various
various personality
personality dimensions
dimensions.. Here is a data set taken from two studies
studies of mood and arousal
using movies to induce affective states.
Usage
data(affect)
Details
These are data from two studies conducted in the Personality, Motivation and Cognition Laboratory
at Northwestern University. Both studies used a similar methodology:
Collection of pretest data using 5 scales from the Eysenck Personality Inventory and items taken
from the Motivational State Questionnaire (see msq. In addition, state and trait anxiety
anxiety measures
were given. In the “maps" study, the Beck Depression Inventory was given also.
Then subjects were randomly assigned to one of four movie conditions: 1: Frontline. A documen-
tary about the liberation of the Bergen-Belsen concentration camp. 2: Halloween. A horror film. 3:
National Geographic, a nature film about the Serengeti plain. 4: Parenthood. A comedy. Each film
clip was shown for 9 minutes. Following this the MSQ was given again.
Data from the MSQ were scored for Energetic and Tense Arousal (EA and TA) as well as Positive
and Negative Affect (PA and NA).
Study flat had 170 participants, study maps had 160.
These studies are described in more detail in various publications from the PMC lab. In particular,
Revelle
Revelle and Anderson,
Anderson, 1997 and Rafaeli
Rafaeli and Revelle
Revelle (2006). An analysi
analysiss of these data has also
appeared in Smillie et al. (2012).
Source
Data collected at the Personality, Motivation, and Cognition Laboratory, Northwestern University.
References
Revelle, William and Anderson, Kristen Joan (1997) Personality, motivation and cognitive perfor-
mance: Final report to the Army Research Institute on contract MDA 903-93-K-0008
Rafaeli, Eshkol and Revelle, William (2006), A premature consensus: Are happiness and sadness
truly opposite affects? Motivation and Emotion, 30, 1, 1-12.
Smillie, Luke D. and Cooper, Andrew and Wilt, Joshua and Revelle, William (2012) Do Extraverts
Get More Bang for the Buck? Refining the Affective-Reactivity Hypothesis of Extraversion. Jour-
nal of Personality and Social Psychology, 103 (2), 206-326.
16 alpha
Examples
data(affect)
describeBy(affect[-1],group="Film")
pairs.panels(affect[14:17],bg=c("red","black","white","blue")[affect$Film],pch=21,
main="
main="Aff
Affect
ect var
varies
ies by mov
movies
ies ")
errorCircles("EA2","TA2",data=affect,group="Film",labels=c("Sad","Fear","Neutral","Humor")
, main="
main="Ene
Eneget
getic
ic and Ten
Tense
se Aro
Arousa
usal
l by Mov
Movie
ie con
condit
dition
ion")
")
errorCircles(x="PA2",y="NA2",data=affect,group="Film",labels=c("Sad","Fear","Neutral","
Humor"
Humor"),
), main="
main="Pos
Positi
itive
ve and Neg
Negati
ative
ve Aff
Affect
ect by Mov
Movie
ie con
condit
dition
ion")
")
alpha Fi
Find
nd two estimates
estimates of reliabil
reliability:
ity: Cronbac
Cronbach’s
h’s alpha and Guttm
Guttman’
an’ss
Lambda 6.
Description
Usage
alpha(x, keys=
alpha(x, keys=NULL,
NULL,cumul
cumulative
ative=FALS
=FALSE,
E, titl
title=NUL
e=NULL,
L, max=1
max=10,na.
0,na.rm
rm = TRUE,
check.keys=FALSE,n.iter=1,delete=TRUE,use="p
check.keys=FALSE,n.iter=1,delete=TRUE,use="pairwise",warnings=TRUE,
airwise",warnings=TRUE,n.obs=NULL)
n.obs=NULL)
Arguments
na.rm The default is to remove missing values and find pairwise correlations
check.keys if TRUE,
TRUE, then
then find the first
first principal
principal compon
component
ent an
and
d revers
reversee key
key item
itemss with
negative loadings. Give a warning if this happens.
n.iter Number of iterations if bootstrapped confidence intervals are desired
delete Delete items with no variance and issue a warning
use Options
Options to pass to the cor function:
function: "every
"everything
thing",
", "all.
"all.obs",
obs", "comp
"complete.
lete.obs"
obs",,
"na.or.complete", or "pairwise.complete.obs". The default is "pairwise"
warnings By default print a warning and a message that items were reversed
reversed.. Suppress the
message if warnings = FALSE
n.obs If using correlation matrices as input, by specify the number of observations
observations,, we
can find confidence intervals
alpha 17
Details
α (Cronbach, 1951) is the same as Guttman’s λ3 (Guttman, 1945) and may be found by
n tr )x
t r(V n Vx tr(
tr(Vx ) −
λ3 = 1 − = =α
n 1 − Vx n 1 Vx −
Perhaps because it is so easy to calculate and is available in most commercial programs, alpha is
without doubt the most frequently reported measure of internal consistency reliability. Alpha is the
mean of all possible
possible spit half reliabil
reliabilities
ities (corr
(corrected
ected for test length). For a unifactoria
unifactoriall test, it is a
reasonable estimate of the first factor saturation, although if the test has any microstructure (i.e., if
it is “lumpy") coefficients β (Revelle, 1979; see ICLUST) and ω h (see omega) are more appropriate
estimates of the general factor saturation. ω t (see omega) is a better estimate of the reliability of the
total test.
Guttman’s Lambda 6 (G6) considers the amount of variance in each item that can be accounted for
the linear regression of all of the other items (the squared multiple correlation or smc), or more
precisely, the variance of the errors, e2j , and is
2
e (1 − r 2
j smc )
λ6 = 1 − =1 − .
Vx Vx
The squared multiple correlation is a lower bound for the item communality and as the number of
items increases, becomes a better estimate.
G6 is also sensitive to lumpyness in the test and should not be taken as a measure of unifactorial
structure. For lumpy tests, it will be greater than alpha. For tests with equal item loadings, alpha >
G6, but if the loadings are unequal or if there is a general factor, G6 > alpha. alpha is a generaliza-
tion of an earlier estimate of reliability for tests with dichotomous items developed by Kuder and
Richardson, known as KR20, and a shortcut approximation, KR21. (See Revelle, in prep).
Alpha and G6 are both positive functions of the number of items in a test as well as the average
intercorrel
intercorrelation
ation of the items in the test. When calculate
calculated
d from the item vari
variance
ancess and total test
variance, as is done here, raw alpha is sensitive to differences in the item variances. Standardized
alpha is based upon the correlations rather than the covariances.
A useful index of the quality of the test that is linear with the number of items and the average
correlation is the Signal/Noise ratio where
nr̄r¯
s/n =
1 nr̄r¯
−
(Cronbach and Gleser, 1964; Revelle and Condon (in press)).
More complete reliability analyses of a single scale can be done using the omega function which
finds ωh and ωt based upon a hierarchical factor analysis.
Alternative functions score.items and cluster.cor will also score multiple scales and report
more useful statistics. “Standardized" alpha is calculated from the inter-item correlations and will
differ from raw alpha.
Four alternativ
alternativee item-whole
item-whole correlations
correlations are reported,
reported, three are con
convent
ventional
ional,, one unique. raw
raw.r
.r
is the correlation
correlation of the item with the entire scale, not correct
correcting
ing for item overl
overlap.
ap. std.r is the
correlation of the item with the entire scale, if each item were standardized. r.drop is the correlation
18 alpha
of the ite
item
m with
with the scale
scale compos
composed
ed of the remain
remaining
ing ite
items.
ms. Althou
Although
gh eac
eachh of these
these are con
conven
ventio
tional
nal
statistics, they have the disadvantage that a) item overlap inflates the first and b) the scale is different
for each item when an item is dropped. Thus, Thus, the fourth altern
alternati
ative,
ve, r.cor,
r.cor, correct
correctss for the item
overlap by subtracting the item variance but then replaces this with the best estimate of common
variance, the smc. This is similar to a suggestion by Cureton (1966).
If some items are to be reversed keyed then they can be specified by either item name or by item
location. (Look at the 3rd and 4th examples
location. examples.).) Automatic
Automatic revreversal
ersal can
can also be done, and this is
based upon the sign of the loadings on the first principal component (Example 5). This requires the
check.keys option to be TRUE. Previous versions defaulted to have check.keys=TRUE, but some
users complained that this made it too easy to find alpha without realizing that some items had been
reversed (even
(even though a warning was issued!). Thus, I have set the default to be check.keys=F
check.keys=FALSE
ALSE
with a warning that some items need to be reversed (if this is the case). To suppress these warnings,
set warnings=FALSE.
Scores are based upon the simpl
Scores simplee averages
averages (or totals) of the items scored.
scored. Rev
Reversed
ersed items
items are
subtracted from the maximum + minimum item response for all the items.
When using raw data, standard errors for the raw alpha are calculated using equation 2 and 3 from
Duhhachek
Duhha chek and Iacobucci
Iacobucci (2004
(2004).
). This is proble
problematic
matic because
because some simulations
simulations suggest these
values are too small. It is probably better to use bootstrapped value
Bootstrapped resamples are found if n.iter > 1. These are returned as the boot object. They may be
plotted or described.
Value
Note
By default, items that correlate negatively with the overall scale will be reverse coded. This option
may be turned off by setting check.keys = FALSE. If items are reversed, then each item is subtracted
from the minimum item response + maximum item response where min and max are taken over all
items.. Thus,
items Thus, if the items inte
intention
ntionally
ally differ
differ in range, the scores will be off by a cons
constant.
tant. See
scoreItems for a solution.
Two experimenta
experimentall measures of Goodness
Goodness of Fit are returned in the outpu
output:t: Unidi
Unidim
m and Fit. They
are not printed or displayed,
displayed, but are available
available for analysis.
analysis. The first is an index of how well the
modeled average correlations actually reproduce the original correlation matrix. The second is how
well the modeled correlations reproduce the off diagonal elements of the matrix. Both are indices
of squared residuals compared to the squared original correlations. These two measures are under
development and might well be modified or dropped in subsequent versions.
Author(s)
William Revelle
References
See Also
Examples
set.se
set.seed(
ed(42)
42) #ke
#keep
ep the sam
same
e sta
starti
rting
ng val
values
ues
#four congeneric
congeneric measu
measures
res
r4 <- sim.congener
sim.congeneric()
ic()
alpha(r4)
#nine
#nine hierar
hierarchi
chical
cal mea
measur
sures
es -- sho
should
uld act
actual
ually
ly use ome
omega
ga
r9 <- sim.hierarch
sim.hierarchical(
ical()
)
alpha(r9)
# exampl
examples
es of two ind
indepe
epende
ndent
nt fac
factor
tors
s tha
that
t pro
produc
duce
e rea
reason
sonabl
able
e alp
alphas
has
20 Bechtoldt
#this is a case
#this case whe
where
re alp
alpha
ha is a poo
poor
r ind
indica
icator
tor of uni
unidim
dimens
ension
ionali
ality
ty
two.f <- sim.item(8)
sim.item(8)
#speci
#specify
fy which
which ite
items
ms to rev
revers
erse
e key by nam
name
e
alpha(two.f,keys=c("V1","V2","V7","V8"))
#by location
location
alpha(two.f,keys=c(1,2,7,8))
#automatic
#automatic reversal base upon first compon
component
ent
alpha(two.f)
#an example
example with dis
discre
crete
te item res
respon
ponses
ses -- show the fre
freque
quenci
ncies
es
items <- sim.congeneric(N=500,short=FALSE,low=-2,high=2,
catego
categoric
rical=
al=TRU
TRUE)
E) #50
#500
0 res
respon
ponses
ses to 4 dis
discre
crete
te ite
items
ms wit
with
h 5 catego
categorie
ries
s
a4 <- alpha(
alpha(ite
items$
ms$obs
observ
erved)
ed) #it
#item
em res
respon
ponse
se ana
analys
lysis
is of con
congen
generi
eric
c mea
measur
sures
es
a4
#summa
#summary
ry just
just giv
gives
es Alp
Alpha
ha
summary(a4)
Description
Holzinger-Swineford (1937) introduced the bifactor model of a general factor and uncorrelated
group factors. The Holzinger data sets are original 14 * 14 matrix from their paper as well as a 9
*9 matrix used as an example
example by Joreskog.
Joreskog. The Thurs
Thurstone
tone corre
correlatio
lation
n matrix is a 9 * 9 matri
matrix
x of
correlations of ability items. The Reise data set is 16 * 16 correlation matrix of mental health items.
The Bechtholdt data sets are both 17 x 17 correlation matrices of ability tests.
Usage
data(Thurstone)
data(Thurstone.33)
data(Holzinger)
data(Holzinger.9)
data(Bechtoldt)
data(Bechtoldt.1)
data(Bechtoldt.2)
data(Reise)
Details
Holzin
Hol zinger
ger and Swinef
Swineford
ord (1937)
(1937) int
introd
roduce
ucedd the bifact
bifactor
or model
model (one
(one gen
genera
erall factor
factor and se
seve
veral
ral gro
group
up
factors) for mental abilities. This is a nice demonstration data set of a hierarchical factor structure
that can be analyzed using the omega function or using sem. The bifactor model is typically used in
measures of cognitive ability.
There are several ways to analyze such data. One is to use the omega function to do a hierarchical
factoring using the schmid-leiman transformation.
transformation. Another is to a regular factor analysis and use
either a bifactor or biquartimin rotation. These latter two functions implement the Jennrich and
Bentler (2011) bifactor and biquartimin transformations.
The 14 variables are ordered to reflect 3 spatial tests, 3 mental speed tests, 4 motor speed tests, and
4 verbal tests. The sample size is 355.
Bechtoldt 21
Another data set from Holzinger (Holzinger.9) represents 9 cognitive abilities (Holzinger, 1939)
and is used as an example by Karl Joreskog (2003) for factor analysis by the MINRES algorithm
and also appears in the LISREL manual as example NPV.KM.
Another classic data set is the 9 variable Thurstone problem which is discussed in detail by R.
P. McDonald (1985, 1999) and and is used as example in the sem package as well as in the PROC
CALIS
CAL IS man
manual
ual for SAS.
SAS. These
These nine
nine tests
tests were
were groupe
grouped
d by Thu
Thurst
rstone
one and Thu
Thurst
rstone
one,, 194
1941
1 (ba
(base
sed
d on
other data) into three factors: Verbal Comprehension, Word Fluency, and Reasoning. The original
data came from Thurstone and Thurstone (1941) but were reanalyzed by Bechthold (1961) who
broke the data set into two. McDonald, in turn, selected these nine variables from the larger set of
17 found in Bechtoldt.2. The sample size is 213.
Another set of 9 cognitive variables attributed to Thurstone (1933) is the data set of 4,175 students
reported by Professor Brigham of Princeton to the College Entrance Examination Board. This set
does not show a clear bifactor solution but is included as a demonstration of the differences between
a maximimum likelihood factor analysis solution versus a principal axis factor solution.
More recent applications of the bifactor model are to the measurement of psychological status. The
Reise data set is a correlation matrix based upon >35,000 observations to the Consumer Assess-
ment of Health Care Provideers and Systems survey instrument. Reise, Morizot, and Hays (2007)
describe a bifactor solution based upon 1,000 cases.
The five factors from Reise et al. reflect Getting care quickly (1-3), Doctor communicates well (4-
7), Courteous and helpful staff (8,9), Getting needed care (10-13), and Health plan customer service
(14-16).
The two
two Bechto
Bechtoldt
ldt dat
dataa se
sets
ts are two sample
sampless fro
from
m Thurs
Thurston
tonee and Thu
Thurst
rstone
one (19
(1941)
41).. They includ
includee 17
variables, 9 of which were used by McDonald to form the Thurstone data set. The sample sizes are
212 and 213 respectively.
respectively. The six proposed factors reflect memory, verbal, words, space, number
and reasoning
reasoning with three markers
markers for all expect the rote memory
memory factor
factor.. 9 var
variable
iabless from this set
appear in the Thurstone data set.
Two more data sets with similar structures are found in the Harman data set.
Source
References
Bechtoldt, Harold,
Bechtoldt, Harold, (1961
(1961).
). An empirical
empirical study of the factor
factor analysis stability
stability hypothesi
hypothesis.
s. Psy-
chometrika, 26, 405-432.
Holzinger, Karl and Swineford, Frances (1937) The Bi-factor method. Psychometrika, 2, 41-54
Holzinger,, K., & Swineford,
Holzinger Swineford, F. (1939). A study in factor analysis
analysis:: The stability
stability of a bifactor
bifactor
solution. Supplementary Educational Monograph, no. 48. Chicago: University of Chicago Press.
22 bestScales
McDonald, Roderick P. (1999) Test theory: A unified treatment. L. Erlbaum Associates. Mahwah,
N.J.
Reise, Steven and Morizot, Julien and Hays, Ron (2007) The role of the bifactor model in resolving
dimensionality issues in health outcomes measures. Quality of Life Research. 16, 19-31.
Thurstone, Louis Leon (1933) The theory of multiple factors. Edwards Brothers, Inc. Ann Arbor
Thurstone, Louis
The University of Leon andPress.
Chicago Thurstone
Thurstone,, Thelma
Chicago, Il. (Gwinn). (1941) Factorial studies of intelligence
intelligence..
Examples
if(!require(
if(!require(GPArot
GPArotation
ation))
)) {messa
{message("I
ge("I am sorry, to run omega requires GPArot
GPArotation
ation")
")
} else {
#holz <- omega(Holzi
omega(Holzinger,4
nger,4,
, title = "14 abilit
ability
y tests from Holzin
Holzinger-Sw
ger-Swinefor
ineford")
d")
#bf <- omega(Reise,
omega(Reise,5,titl
5,title="16
e="16 health items from Reise"
Reise")
)
#omega(Reise
#omega(Reise,5,lab
,5,labels=c
els=colname
olnames(Reis
s(Reise),tit
e),title="16
le="16 healt
health
h items from Reise"
Reise")
)
thur.om
thur.om <- omega(Thurs
omega(Thurstone,t
tone,title="
itle="9
9 variab
variables
les from Thurstone") #compare with
thur.bf
thur.bf <- fa(Thu
fa(Thurstone
rstone,3,rot
,3,rotate="b
ate="biquart
iquartimin")
imin")
factor.congruence(thur.om,thur.bf)
}
Description
When constructing scales through rational, factorial, or empirical means, it is useful to examine the
content of the items that relate most highly to each other (e.g., the factor loadings of fa.lookup
of a set of items) , or to some specific set of criteria (e.g., bestScales). Giv Given
en a dictionar
dictionaryy of
item content, these routines will sort by factor loading or criteria correlations and display the item
content.
Usage
bestSc
bestScale
ales(x
s(x,
, cri
criter
teria,
ia, cut = 0.1
0.1,
, n.i
n.item
tem = 10, ove
overla
rlap
p = FAL
FALSE,
SE,
dictio
dic tionar
nary
y = NUL
NULL,
L, dig
digits
its = 2)
bestItems(x,criteria=1,cut=.3, abs=TRUE, dictionary=NULL,cor=TRU
bestItems(x,criteria=1,cut=.3, dictionary=NULL,cor=TRUE,digits=2)
E,digits=2)
lookup(x,y,criteria=NULL)
fa.lookup(f,dictionary,digits=2)
item.looku
item.lookup(f,
p(f,m,
m, dictionary
dictionary,cut=
,cut=.3,
.3, digits
digits = 2)
Arguments
abs if TRUE,
TRUE, sort by absolute value in bestItems
dictionary a data.frame
data.frame with rownames corresponding to rorownames
wnames in the f$loadings ma-
trix or colnames of the data matrix or correlation matrix, and entries (may be
multiple columns) of item content.
m A data frame of item means
Details
bestItems and lookup are simple helper functions to summarize correlation matrices or factor
loading matrices. bestItems will sort the specified column (criteria) of x on the basis of the (ab-
solute) value of the column. The return as a default
solute) default is just the rowname
rowname of the variab
variable
le with those
absolute
absolute values
values > cut. If there is a dictionary
dictionary of item content
content and item names, then include the
contents as a two column matrix with rownames corresponding to the item name and then as many
fields as desired for item content. (See the example dictionary bfi.dictionary).
lookup is used by bestItems and will find values in c1 of y that match
match those in x. It returns thos
thosee
rows of y of that match x. Suppose
Suppose that you have a "dictionary"
"dictionary" of the many variables
variables in a study
but you want to consider a small subset of them in a data set x. Then, you can find the entries in the
dictionary corresponding to x by lookup(rownames(x),y) If the column is not specified, then it will
match by rownames(y).
fa.lookup is used when examining the output of a factor analysis and one wants the correspond-
ing variable
variable names and contents.
contents. The returne
returnedd object may then be printe
printed
d in LaT
LaTex
ex by using the
df2latex function with the char option set to TRUE.
Similarly, given a correlation matrix, r, of the x variables, if you want to find the items that most
correlate with another item or scale, and then show the contents of that item from the dictionary,
bestItems(r,c1=column number or name of x, contents = y)
bestScales will find up to n.items that have absolute correlations with a criterion greater than cut.
If the overlap option is FALSE (default) the other criteria are not used.
item.lookup combines the output from a factor analysis fa with simple descriptive statistics (a
data frame
by item of means)
mean. with aa dictionary.
This allows Items are grouped
better understanding of how aby factor
scale loadings
works, > cut,
in terms of and then sorted
the meaning of
the item endorsements.
Value
bestScales returns the correlation of the empirically constructed scale with each criteria and the
items used in the scale. If a dictionary is specified, it also returns a list (value) that shows the item
content. Also returns the keys list so that scales can be found using cluster.cor or scoreItems.
bestItems returns a sorted list of factor loadings or correlations with the labels as provided in the
dictionary.
lookup is a very simple implementation of the match function.
fa.lookup takes a factor/cluster analysis object (or just a keys like matrix), sorts it using fa.sort
and then matches by row.name to the corresponding dictionary entries.
24 bfi
Note
To create a dictionary, create an object with row names as the item numbers, and the columns as the
item content. See the link{bfi.dictionary} as an example.
Note
Although empirical scale construction is appealing, it has the basic problem of capitalizing on
chance. Thus, be careful of over interpreting the results unless working with large samples.
Author(s)
William Revelle
References
Re
Reve
velle
lle,, W. (in prepar
preparati
ation)
on) An introd
introduct
uction
ion to psycho
psychomet
metric
ric theory
theory wit
with
h applic
applicati
ations
ons in R. Spr
Spring
inger
er..
(A
(Available
vailable online at http://personality-project.org/r/boo
http://personality-project.org/r/book k).
See Also
fa, iclust,principal
Examples
bs <- bestScales(bfi,criteria=c("gender","education","age"),dictionary=bfi.dictionary)
bs
f5 <- fa(bfi
fa(bfi,5)
,5)
m <- colMeans(bfi
colMeans(bfi,na.r
,na.rm=TRUE
m=TRUE)
)
item.lookup(f5,m,dictionary=bfi.dictionary[2])
fa.lookup(f5
fa.lookup(f5,dicti
,dictionary
onary=bfi.d
=bfi.diction
ictionary[2]
ary[2])
) #just show the item content, not the source of the items
Description
25 personality self report items taken from the International Personality Item Pool (ipip.ori.org)
were included as part of the Synthetic Aperture Personality Assessment (SAPA) web based per-
sonality
sona lity assessment
assessment project.
project. The data from 2800 subjects
subjects are inclu
included
ded here as a demonstra
demonstration
tion
set for scale constructi
construction,
on, factor analysis,
analysis, and Item Response Theor
Theoryy analysis.
analysis. Three additional
additional
demographic variables (sex, education, and age) are also included.
Usage
data(bfi)
data(bfi.dictionary)
bfi 25
Format
A data frame with 2800 observations on the following 28 variables. (The q numbers are the SAPA
item numbers).
A1 Am indifferent to the feelings of others. (q_146)
A2 Inquire about others’ well-being. (q_1162)
A3 Know how to comfort others. (q_1206)
A4 Love children. (q_1364)
A5 Make people feel at ease. (q_1419)
C1 Am exacting in my work. (q_124)
C2 Continue until everything is perfect. (q_530)
C3 Do things according to a plan. (q_619)
C4 Do things in a half-way manner. (q_626)
C5 Waste my time. (q_1949)
E1 Don’t talk a lot. (q_712)
E2 Find it difficult to approach others. (q_901)
E3 Know how to captivate people. (q_1205)
E4 Make friends easily. (q_1410)
E5 Take charge. (q_1768)
Details
Source
The items are from the ipip (Goldberg, 1999). The data are from the SAPA project (Revelle, Wilt
and Rosenthal, 2010) , collected Spring, 2010 ( http://sapa-project.org).
References
Goldberg, L.R. (1999) A broad-bandwidth, public domain, personality inventory measuring the
lower-level facets of several five-factor models. In Mervielde, I. and Deary, I. and De Fruyt, F. and
Ostendorf,
Ostendorf, F. (eds) Personalit
Personalityy psycholog
psychology
y in Europe.
Europe. 7. Ti
Tilbur
lburg g Univers
University
ity Press. Til
Tilbur
burg,
g, The
Netherlands.
Revelle, W.,
Revelle, W., Wilt, J., and Rose
Rosenthal
nthal,, A. (2010
(2010)) Personalit
Personality
y and Cogn
Cognition:
ition: The Perso
Personalit
nality-Cog
y-Cognition
nition
Link. In Gruszka, A. and Matthews, G. and Szymura, B. (Eds.) Handbook of Individual Differences
in Cognition: Attention, Memory and Executive Control, Springer.
See Also
bi.bars to show the data by age and gender, irt.fa for item factor analysis applying the irt model.
Examples
data(bfi)
describe(bfi)
keys.list <-
keys.list
list(agree=c("-A1","A2","A3","A4","A5"),conscientious=c("C1","C2","C3","-C4","-C5"),
extraversion=c("-E1","-E2","E3","E4","E5"),neuroticism=c("N1","N2","N3","N4","N5"),
openness
openness = c("O1"
c("O1","-O2
,"-O2","O3"
","O3","O4",
,"O4","-O5")
"-O5"))
)
keys <- make.keys(b
make.keys(bfi,key
fi,keys.list
s.list)
)
Description
When showing e.g., age or education distributions for two groups, it is convenient to plot them back
to back. bi.bars will do so.
Usage
bi.bars(x,grp,horiz,color,label=NULL,...)
biplot.psych 27
Arguments
color colors for the two groups – defaults to blue and red
label If specified, labels for the dependent axis
... Further parameters to pass to the graphing program
Details
A trivial, if useful, function to draw back to back histograms/barplots. One for each group.
Value
a graphic
Author(s)
William Revelle
Examples
data(bfi)
with(bfi,{bi
with(bfi,{bi.bars(
.bars(age,g
age,gender,
ender,ylab="
ylab="Age",m
Age",main="A
ain="Age
ge by males and female
females")
s")
bi.bars(education,gender,xlab="Education",main="Education by gender",horiz=FALSE)})
biplot.psych Dra
Draww biplots
biplots of facto
factorr or compo
component
nent scor
scores
es by facto
factorr or compo
component
nent
loadings
Description
Extends the biplot function to the output of fa , fa.poly or principal. Will plot factor scores and
factor loadings in the same graph. If the number of factors > 2, then all pairs of factors are plotted.
Factor
Fact or score histograms
histograms are plotted on the diagonal. object from fa,
diagonal. The input is the resulting object
principal, or }code{linkfa.poly with the scores=TRUE option. Points may be colored according
to other criteria.
Usage
## S3 me
meth
thod
od fo
for
r cl
clas
ass
s psych
biplot(x, labels=NULL,cex=c(.75,1),main="Biplot
labels=NULL,cex=c(.75,1),main="Biplot from fa",
hist.col="cyan",xlim.s=c(-3,3),ylim.s=c(-3,3)
hist.col="cyan",xlim.s=c(-3,3),ylim.s=c(-3,3),xlim.f=c(-1,1),ylim.f=
,xlim.f=c(-1,1),ylim.f=c(-1,1),
c(-1,1),
maxpoints=100,adjust=1.2,col,pos,
maxpoints=100,adjust=1.2,col,pos, arrow.len = 0.1,pch=16,choose=NULL,
cuts=1,cutl=.0,group=NULL,...)
28 biplot.psych
Arguments
cex A vector of plot sizes of the data labels and of the factor labels
main A main title for a two factor biplot
hist.col If plotting more than two factors, the color of the histogram of the factor scores
xlim.s x limits of the scores. Defaults to plus/minus three sigma
ylim.s y limits of the scores.Defaults to plus/minus three sigma
xlim.f x limits of the factor loadings.Defaults to plus/minus 1.0
ylim.f y limits of the factor loadings.Defaults to plus/minus 1.0
maxpoints When plotting
plotting 3 (or more)
more) dimen
dimensions
sions,, at w
what
hat size should
should we switch
switch from
from
plotting "o" to plotting "."
adjust an adjustment factor in the histogram
col a vector of colors for the data points and for the factor loading labels
pos If plotting
plotting labels,
labels, what position
position shou
should
ld they be in? 1=below
1=below,, 2=lef
2=left,
t, 3 top, 4
right. If missing, then the assumption is that labels should be printed instead of
data points.
arrow.len the length of the arrow head
pch The plotting character to use. pch=16 gives reasonable size dots. pch="." gives
tiny points. If adding colors, use pch between 21 and 25. (see examples).
choose Plot just the specified factors
cuts Do not label cases with abs(factor scores) < cuts) (Actually
(Actually,, the distance of the
x and y scores from 0)
cutl Do not label variables with communalities in the two space < cutl
group A vect
vector
or of a gr
grou
oupi
ping
ng vari
variab
able
le for
for the
the sc
scor
ores
es.. Sh
Show
ow a diff
differ
eren
entt co
colo
lorr an
and
d sy
symb
mbol
ol
for each group.
... more options for graphics
Details
Uses the generic biplot function to take the output of a factor analysis fa, fa.poly or principal com-
ponents analysis principal and plot the factor/component scores along with the factor/component
loadings.
This is an extension of the generic biplot function to allow more control over plotting points in a
two space and also to plot three or more factors (two at time).
This will work for objects produced by fa , fa.poly or principal if they applied to the original
data matrix. If however, one has a correlation matrix based upon the output from tetrachoric or
polychoric, and has done either fa or principal on the correlations, then obviously, we can not
do a biplot.
biplot. Howev
However er,, both of those functions produce
produce a weig
weights
hts matrix, which, in combinatio
combination
n
with the original data can be used to find the scores by using factor.scores. Since biplot.psych is
looking for two elements of the x object: x$loadings and x$scores, you can create the appropriate
object to plot. See the third example.
block.random 29
Author(s)
William Revelle
See Also
Examples
#the standard
standard examp
example
le
data(USArrests)
fa2 <- fa(USArrests
fa(USArrests,2,sco
,2,scores=TR
res=TRUE)
UE)
biplot(fa2,labels=rownames(USArrests))
# pl
plot
ot th
the
e 3 fact
factor
or solu
soluti
tion
on
data(bfi)
fa3 <- fa(bfi[1:200
fa(bfi[1:200,1:15]
,1:15],3,sco
,3,scores=TR
res=TRUE)
UE)
biplot(fa3)
#j
#jus
ust
t pl
plot
ot fact
factor
ors
s 1 and
and 3 from
from that
that solu
soluti
tion
on
biplot(fa3,choose=c(1,3))
r <- cor(bfi[1:20
cor(bfi[1:200,1:1
0,1:10],
0], use="p
use="pairwis
airwise")
e") #find the correl
correlations
ations
f2 <- fa(r,2
fa(r,2)
)
x <- li
list
st()
()
x$scores
x$scores <- factor
factor.scor
.scores(bfi
es(bfi[1:200
[1:200,1:10]
,1:10],f2)
,f2)
x$loadings
x$loadings <- f2$lo
f2$loadings
adings
class(
class(x)
x) <- c( psych , fa )
biplot(x,mai
biplot(x,main="bip
n="biplot
lot from correl
correlation
ation matrix and factor scores")
Description
Random assignment of n subjects with an equal number in all of N conditions may done by block
randomizat
rando mization,
ion, where the block size is the number
number of expe
experimen
rimental
tal conditio
conditions.
ns. The number of
Independen
Indep endentt Variables
ariables and the number
number of lev
levels
els in each IV are spec
specified
ified as input. The output is a
the block randomized design.
Usage
block.rand
block.random(n
om(n,
, ncond = NULL)
30 blot
Arguments
n The number
number of subjects
subjects to randomize.
randomize. Must be a multip
multiple
le of the numbe
numberr of
experimental conditions
ncond The numbe
numberr of conditions
conditions for each IV.
IV. Defa
Defaults
ults to 2 levels
levels for one IV.
IV. If more
than one IV, specify as a vector. If names are provided, they are used, otherwise
the IVs are labeled as IV1 ... IVn
Value
blocks A matrix of subject numbers, block number, and randomized levels for each IV
Note
Author(s)
William Revelle
Examples
br <- block.random
block.random(n=24
(n=24,c(2,3
,c(2,3))
))
pairs.panels(br)
br <- block.random
block.random(96,c
(96,c(time=
(time=4,drug
4,drug=3,sex
=3,sex=2))
=2))
pairs.panels(br)
Description
35 items for 150 subjects from Bond’s Logical Operations Test. A good example of Item Response
Theory
Theo ry analysis using the Rasch model. One parameter
parameter (Rasch) analysis
analysis and two parameter
parameter IRT
analyses produce somewhat different results.
Usage
data(blot)
Format
Details
Bond and Fox apply Rasch modeling to a variety of data sets. This one, Bond’s Logical Operations
Test, is used as an example of Rasch modeling for dichotomous items. In their text (p 56), Bond and
Fox report the results using WINSTEPS. Those results are consistent (up to a scaling parameter)
with
wit h tho
those
se found by the rasch
rasch fun
functi
ction
on in the ltm packag
package.e. The
The WIN
WINSTE
STEPS
PS seem
seem to produce
produce
difficulty estimates with a mean item difficulty of 0, whereas rasch from ltm has a mean difficulty
of -1.52. In addition, rasch seems to reverse the signs of the difficulty estimates when reporting the
coefficients and is effectively reporting "easiness".
However, when using a two parameter model, one of the items (V12) behaves very differently.
This data set is useful when comparing 1PL, 2PL and 2PN IRT models.
Source
The dat
dataa are tak
taken
en (with
(with kind
kind permis
permissio
sion
n fro
from
m Tr
Trev
evor
or Bond)
Bond) fro
from
m the web
webpag
pagee http:/
http://ho
/homes
mes.jc
.jcu.e
u.edu.
du.au/
au/~ed
~edtgb
tgb/bo
/book/
ok/dat
dataa
and read using read.fwf.
References
See Also
Examples
data(blot)
#not
#not run
#library(ltm)
#bblot
#bblot.ra
.rasch
sch <- ras
rasch(
ch(blo
blot,
t, con
constr
strain
aint
t = cbi
cbind(
nd(nco
ncol(b
l(blot
lot)
) + 1, 1)) #a 1PL model
#blot.
#blot.2pl
2pl <- ltm(blot
ltm(blot~z1
~z1)
) #a 2PL model
#do the same
same thi
thing
ng with fun
functi
ctions
ons in psy
psych
ch
#b
#blo
lot.
t.fa
fa <- irt.
irt.fa
fa(b
(blo
lot)
t) # a 2PN
2PN mode
model
l
#plot(blot.fa)
bock Bock and Liberman (1970) data set of 1000 observations of the LSAT
Description
An example data set used by McDonald (1999) as well as other discussions of Item Response
Theory makes use of a data table on 10 items (two sets of 5) from the Law School Admissions Test
(LSAT). Included in this data set is the original table as well as the reponses for 1000 subjects on
the first set (Figure Classification) and second set (Debate).
Usage
data(bock)
32 bock
Format
Q1 Responses to item 1
Q2 Responses to item 2
Q3 Responses to item 3
Q4 Responses to item 4
Q5 Responses to item 5
Details
Source
References
R.P. McDonald. Test theory: A unified treatment. L. Erlbaum Associates, Mahwah, N.J., 1999.
Examples
data(bock)
responses <- table2df(bock.table[,2:6],count=bock.table[,7],
labs= paste("lsat6.",1:5,sep=""))
describe(responses)
## maybe str(bock.table)
str(bock.table) ; plot(b
plot(bock.ta
ock.table)
ble) ...
burt 33
Description
Cyril Burt reported an early factor analysis with a circumplex structure of 11 emotional variables in
1915. 8 of these were subsequently used by Harman in his text on factor analysis. Unfortunately, it
seems as if Burt made a mistake for the matrix is not positive definite. With one change from .87 to
.81 the matrix is positive definite.
Usage
data(burt)
Format
A correlation matrix based upon 172 "normal school age children aged 9-12".
Sociality Sociality
Sorrow Sorrow
Tenderness Tenderness
Joy Joy
Wonder Wonder
Elation Elation
Disgust Disgust
Anger Anger
Sex Sex
Fear Fear
Subjection Subjection
Details
examples
has one negative eigenvalue., and
(see Harman.Burt Withit the
is an example ofof
replacement howthetypos affect data.
correlation The Sorrow
between originaland
dataTender-
matrix
ness from .87 to .81, the matrix is positive definite.
Alternatively, using cor.smooth, the matrix
matrix can be made
made pos
positi
itive
ve definit
definitee as well,
well, althou
although
gh cor
cor.sm
.smoot
ooth
h
makes more (but smaller) changes.
Source
References
Burt, C.General and Specific Factors underlying the Primary Emotions. Reports of the British As-
sociation
sociation for the Advance
Advancement
ment of Science,
Science, 85th meeting,
meeting, held in Manchest
Manchester,
er, Septe
September
mber 7-11, 1915.
London,
Lond on, John Murray
Murray, 1916, p. 694-696
694-696 (retri
(retriev
eved
ed from the web at http:/
http://www
/www.biod
.biodive
iversity
rsitylibra
library
ry.org
.org/item
/item/9582
/95822#790
2#790))
34 circ.tests
See Also
Examples
data(burt)
eigen(bur
eigen(burt)$
t)$val
values
ues #on
#one
e is neg
negati
ative!
ve!
burt.n
burt.new
ew <- bur
burt
t
burt.new[2,3
burt.new[2,3]
] <- burt.
burt.new[3,
new[3,2]
2] <- .81
eigen(burt.n
eigen(burt.new)$va
ew)$values
lues #all are ppositiv
ositive
e
bs <- cor.smooth(b
cor.smooth(burt)
urt)
round(burt.n
round(burt.new
ew - bs,3)
Description
Rotations of factor analysis and principal components analysis solutions typically try to represent
correlatio
correlation
n matrices as simple structured.
structured. An alternativ
alternativee structure,
structure, appealing
appealing to some, is a cir-
cumplex structure where the variables are uniformly spaced on the perimeter of a circle in a two
dimensional space. Generating these data is straightforward, and is useful for exploring alternative
solutions to affect and personality structure.
Usage
circ.t
circ.test
ests(l
s(load
oads,
s, loa
loadin
ding
g = TRU
TRUE,
E, sor
sortin
ting
g = TRU
TRUE)
E)
Arguments
Details
“A common model for representing psychological data is simple structure (Thurstone, 1947). Ac-
cording
cording to one common interpretation
interpretation,, data are simple
simple structured
structured when items or scales
scales have
have non-
zero factor loadings on one and only one factor (Revelle & Rocklin, 1979). Despite the common-
place application of simple structure, some psychological models are defined by a lack of simple
structure. Circumplexes (Guttman, 1954) are one kind of model in which simple structure is lack-
ing.
“A number of elementary requirements can be teased out of the idea of circumplex structure. First,
circumplex structure implies minimally that variables are interrelated; random noise does not a
circumple
circu mplex x make
make.. Secon
Second,
d, circumple
circumplex
x structure
structure implies that the domain
domain in question is optim
optimally
ally
represented by two and only two dimensions. Third, circumplex structure implies that variables do
not group or clump along the two axes, as in simple structure, but rather that there are always inter-
stitial variables between any orthogonal pair of axes (Saucier, 1992). In the ideal case, this quality
will be reflected in equal spacing of variables along the circumference of the circle (Gurtman, 1994;
circ.tests 35
Wiggins, Steiger, & Gaelick, 1981). Fourth, circumplex structure implies that variables have a con-
stant radius from the center of the circle, which implies that all variables have
have equal communality on
the two circumplex dimensions (Fisher, 1997; Gurtman, 1994). Fifth, circumplex structure implies
that all rotations are equally good representations of the domain (Conte & Plutchik, 1981; Larsen
& Diener, 1992). (Acton and Revelle, 2004)
Acton and Revelle reviewed the effectiveness of 10 tests of circumplex structure and found that
four did a particularly good job of discriminating circumplex structure from simple structure, or
circumplexes from ellipsoidal structures.
structures. Unfortunately
Unfortunately,, their work was done in Pascal and is not
easily available. Here we release R code to do the four most useful tests:
1 The Gap test of equal spacing
2 Fisher’s test of equality of axes
3 A test of indifference to Rotation
4 A test of equal Variance of squared factor loadings across arbitrary rotations.
To interpret the values of these various tests, it is useful to compare the particular solution to simu-
lated solutions representing pure cases of circumplex and simple structure. See the example output
from circ.simulation and compare these plots with the results of the circ.test.
Value
A list of four items is returned. These are the gap, fisher, rotation and variance test results.
gaps gap.test
fisher fisher.test
RT rotation.test
VT variance.test
Note
Of the 10 criterion discussed in Acton and Revelle (2004), these tests operationalize the four most
useful.
Author(s)
William Revelle
References
Acton, G. S. and Revelle, W. (2004) Evaluation of Ten Psychometric Criteria for Circumplex Struc-
ture. Methods of Psychological Research Online, Vol. 9, No. 1 http://personality-project.
org/revelle/publications/acton.revelle.mpr110_10.pdf
See Also
To understand
understand the results of the circ.
circ.test
testss it it best to compare
compare it to simulated
simulated values.
values. Thus,
Thus, see
circ.simulation, sim.circ
36 cities
Examples
circ.data
circ.data <- circ.s
circ.sim(24,
im(24,500)
500)
circ.fa <- fa(circ.dat
circ.fa fa(circ.data,2)
a,2)
plot(circ.fa,title="Circumplex Structure")
ct <- circ.tests(c
circ.tests(circ.f
irc.fa)
a)
#compare
#compare with non-c
non-circump
ircumplex
lex data
simp.data
simp.data <- item.s
item.sim(24,
im(24,500)
500)
simp.fa <- fa(simp.dat
simp.fa fa(simp.data,2)
a,2)
plot(simp.fa,title="Simple Structure")
st <- circ.tests(s
circ.tests(simp.f
imp.fa)
a)
res <- rbind(ct[1:4
rbind(ct[1:4],st[1
],st[1:4])
:4])
rownames(res
rownames(res)
) <- c("ci
c("circumpl
rcumplex","S
ex","Simple"
imple")
)
print(res,digits=2)
Description
Airline distances between 11 US cities may be used as an example for multidimensional scaling or
cluster analysis.
Usage
data(cities)
Format
Details
An 11 x11
x11 ma
matr
trix
ix of di
dist
stan
ance
cess betw
betwee
een
n ma
majo
jorr US ai
airp
rpor
orts
ts.. This
This is a usef
useful
ul demo
demons
nstr
trat
atio
ion
n of mu
mult
ltip
iple
le
dimensional scaling.
city.location is a dataframe of longitude and latitude for those cities.
Note that the 2 dimensional MDS solution does not perfectly capture the data from these city dis-
tances. Boston, New York and Washington, D.C. are located slightly too far west, and Seattle and
LA are slightly too far south.
cluster.fit 37
Source
http://www.timeanddate.com/worldclock/distance.html
Examples
data(cities)
city.locatio
city.location[,1]
n[,1] <- -city.
-city.locati
location[,1]
on[,1]
#not
#not run
#a
#an
n ov
over
erla
lay
y map
map can
can be adde
added
d if the
the pack
packag
age
e maps
maps is avai
availa
labl
ble
e
#
#
#libary(maps)
#map("usa")
#title("Mult
#title("MultiDimen
iDimensiona
sional
l Scalin
Scaling
g of US cities
cities")
")
#points(city.location)
plot(city.location
plot(city.location,
, xlab="
xlab="Dimens
Dimension
ion 1", ylab="
ylab="Dimen
Dimension
sion 2",
main ="Multidimensiona
="Multidimensional
l scalin
scaling
g of US cities
cities")
")
city.l
city.loc
oc <- cmd
cmdsca
scale(
le(cit
cities
ies,
, k=2
k=2)
) #as
#ask
k for a 2 dim
dimens
ension
ional
al sol
soluti
ution
on rou
round(
nd(cit
city.l
y.loc,
oc,0)
0)
city.loc
city.loc <- -city.
-city.loc
loc
city.loc <- rescale(city.loc,apply(city.location,2,mean),apply(city.location,2,sd))
points(city.loc,type="n")
text(city.loc,labels=names(cities))
Description
How well does the cluster model found by ICLUST fit the original correlation
correlation matri
matrix?
x? A similar
algorithm factor.fit is found in VSS . This function is internal to ICLUST but has more general
use as well.
In general, the cluster model is a Very
Very Simple Structure model of complexity
complexity one. That is, every
item is assumed to represent only one factor/cluster. Cluster fit is an analysis of how well this model
reproduces a correlation matrix. Two measures of fit are given: cluster fit and factor fit. Cluster fit
assumes
assumes that variable
variabless that define different
different clusters
clusters are ortho
orthogonal
gonal.. Fact
Factor
or fit take
takess the loadings
generated by a cluster model, finds the cluster loadings on all clusters, and measures the degree of
fit of this somewhat more complicated model. Because the cluster loadings are similar to, but not
identical to factor loadings, the factor fits found here and by factor.fit will be similar.
Usage
cluster.fi
cluster.fit(or
t(origina
iginal,
l, load, clust
clusters,
ers, diago
diagonal
nal = FALSE
FALSE)
)
Arguments
Details
The cluster
cluster model is similar
similar to the factor model:
model: R is fitted by C’C. Where C <- Cluster defini
definition
tion
matrix x the loading matrix. How well does this model approximate the original correlation matrix
and how does this compare to a factor model?
The fit statistic is a comparison of the original (squared) correlations to the residual correlations.
Fit = 1 - r*2/r2 where r* is the residual correlation of data - model and model = C’C.
Value
Author(s)
References
http://personality-project.org/r/r.ICLUST.html
See Also
Examples
r.mat<- Harman74.cor$cov
iq.clus
iq.clus <- ICLUST
ICLUST(r.ma
(r.mat,nclu
t,nclusters
sters =2)
fit <- cluster.fit(r.mat,iq.clus$loadings,iq.clus$clusters)
fit
Description
Given a n x n correlation matrix and a n x c matrix of -1,0,1 cluster weights for those n items on c
clusters, find the correlation of each item with each cluster. If the item is part of the cluster, correct
for item overlap. Part of the ICLUST set of functions, but useful for many item analysis problems.
Usage
cluster.lo
cluster.loadin
adings(ke
gs(keys,
ys, r.mat,
r.mat, correct
correct = TRUE,SMC=T
TRUE,SMC=TRUE)
RUE)
cluster.loadings 39
Arguments
SMC Use the squared multiple correlation as a communality estimate, otherwise use
the greatest correlation for each variable
Details
Given a set of items to be scored as (perhaps overlapping) clusters and the intercorrelation matrix
of the items,
items, find the clusters
clusters and then the correlatio
correlations
ns of each item with each cluster.
cluster. Correct
Correct for
item overlap by replacing the item variance with its average within cluster inter-item correlation.
Although part of
Although of ICLUST
ICLUST,, this may be
be used in an
any SAPA (http://sapa-project.org) application
y SAPA
where we are interested in item- whole correlations of items and composite scales.
These loadings are particularly interpretable when sorted by absolute magnitude for each cluster
(see ICLUST.sort).
Value
loadings A matrix of item-cluster correlations (loadings)
cor Correlation matrix of the clusters
corrected Correlation matrix of the clusters, raw correlations below the diagonal, alpha on
diagonal, corrected for reliability above the diagonal
sd Cluster standard deviations
alpha alpha reliabilities of the clusters
G6 G6* Modified estimated of Guttman Lambda 6
count Number of items in the cluster
Note
Although part of ICLUST, this may be used in any SAPA application where we are interested in
item- whole correlations of items and composite scales.
Author(s)
References
ICLUST: http://personality-project.org/r/r.ICL
http://personality-project.org/r/r.ICLUST.html
UST.html
See Also
Examples
r.mat<- Harman74.cor$cov
clusters <- matrix(c(1,1,1,rep(0,24),1,1,1,1,rep(0,17)),ncol=2)
cluster.loadings(clusters,r.mat)
cluster.plot Plot factor/cluster loadings and assign items to clusters by their high-
est loading.
Description
Cluster analysis and factor analysis are procedures for grouping items in terms of a smaller number
of (latent)
(latent) factors or (observed
(observed)) clusters.
clusters. Graph
Graphical
ical presentation
presentationss of clust
clusters
ers typically
typically sho
show
w tree
structures, although they can be represented in terms of item by cluster correlations.
.plot plots items by their cluster loadings (taken, e.g., from ICLUST) or factor loadings ((taken,
Cluster.plot
Cluster taken,
eg., from
highest fa ). Clus
Cluster
(absolute) ter membership
member
cluster ship
loading formay
eachbeitem.
assigned apriori
apriori or may be determin
determined
ed in terms of the
If the input is an object of class "kmeans", then the cluster centers are plotted.
Usage
cluster.pl
cluster.plot(i
ot(ic.res
c.results,
ults, cluster = NULL, cut = 0, label
labels=NUL
s=NULL,
L,
title = "Cluster plot",pch=18,pos,show.points=TRUE,choose=NULL,...)
plot",pch=18,pos,show.points=TRUE,choose=NULL,...)
fa.plot(ic
fa.plot(ic.res
.results,
ults, cluster = NULL, cut = 0, label
labels=NUL
s=NULL,tit
L,title,
le,
jiggle=FALSE,amount=.02,pch=18,pos,show.poin
jiggle=FALSE,amount=.02,pch=18,pos,show.points=TRUE,choose=NULL,...
ts=TRUE,choose=NULL,...)
)
factor.plo
factor.plot(ic
t(ic.resu
.results,
lts, cluster
cluster = NULL, cut = 0, label
labels=NUL
s=NULL,tit
L,title,ji
le,jiggle=
ggle=FALSE
FALSE,
,
amount=.02,pch=18,pos,show.points=TRUE,...)
amount=.02,pch=18,pos,show.points=TRUE,...) #deprecated
Arguments
ic.results A factor
factor analysis
analysis or cluster
cluster analysi
analysiss output
output inc
includin
luding
g the lo
loading
adings,
s, or a matrix
matrix
of item by cluster correlations. Or the output from a kmeans cluster analysis.
cluster A vector of cluster membership
cut Assign items to clusters if the absolute loadings are > cut
labels If row.name
row.namess exist
exist they will be added
added to
to the
the plot, or, if they don’
don’t,
t, llabels
abels can
be specified.
specified. If labels =NULL
=NULL,, and there are no row names, then varia
variables
bles are
labeled by row number.)
title Any title
jiggle When plotti
plotting
ng with factor
factor loadings
loadings that are almos
almostt identical
identical,, it is sometimes
sometimes
useful to "jiggle" the points by jittering them. The default is to not jiggle.
amount if jiggle=TRUE,
jiggle=TRUE, then how much should the points be jittered?
pch factor and clusters are shown with different pch values, starting at pch+1