The Psych Package October 11, 2007
Total Page:16
File Type:pdf, Size:1020Kb
The psych Package October 11, 2007 Version 1.0-33 Date 2007-10-08 Title Procedures for Personality and Psychological Research Author William Revelle <[email protected]> Maintainer William Revelle <[email protected]> Description A number of routines for personality, psychometrics and experimental psychology. Functions are primarily for scale construction, cluster analysis and reliability analysis, although others are basic descriptive stats. For more information, see the personality-project.org/r. License GPL version 2 or newer Suggests polycor, GPArotation, MASS, Rgraphviz URL http://personality-project.org/r, http://personality-project.org/r/psych.manual.pdf R topics documented: 00psych-package . 3 ICLUST . 7 ICLUST.cluster . 14 ICLUST.graph . 16 ICLUST.rgraph . 19 ICLUST.sort . 21 VSS............................................. 22 VSS.parallel . 25 VSS.plot . 26 VSS.scree . 27 VSS.simulate . 28 alpha.scale . 29 bfi.............................................. 30 circ.simulation . 32 circ.tests . 33 cluster.cor . 35 1 2 R topics documented: cluster.fit . 37 cluster.loadings . 39 cluster.plot . 40 congeneric.sim . 41 correct.cor . 42 count.pairwise . 44 describe . 45 describe.by . 46 eigen.loadings . 48 error.bars . 49 error.crosses . 50 fa.graph . 51 fa.parallel . 52 factor.congruence . 54 factor.fit . 55 factor.model . 56 factor.pa . 57 factor.residuals . 59 factor.rotate . 60 factor2cluster . 61 fisherz . 63 geometric.mean . 64 harmonic.mean . 65 iqitems . 66 irt.item.diff.rasch . 67 irt.1p . 68 item.sim . 70 kurtosi . 71 make.hierarchical . 72 mat.regress . 74 matrix.addition . 75 multi.hist . 76 omega............................................ 77 omega.graph . 80 p.rep . 82 paired.r . 84 pairs.panels . 85 phi.............................................. 86 phi2poly . 87 polar . 88 poly.mat . 89 polychor.matrix . 90 principal . 91 psycho.demo . 93 read.clipboard . 94 sat.act . 95 schmid . 96 score.alpha . 97 00psych-package 3 score.items . 99 score.multiple.choice . 101 skew............................................. 102 test.psych . 103 Index 105 00psych-package A package for personality, psychometric, and psychological research Description The psych package has been developed at Northwestern University to include functions most useful for personality and psychological research. Some of the functions (e.g., describe, pairs.panels, error.bars ) are useful for basic descriptive analyses. Psychometric applications include routines for Very Simple Structure (VSS), Item Cluster Analysis (ICLUST) and principal axes factor analysis (factor.pa), as well as functions to do Schmid Leiman transformations (schmid) to transform a hierarchical factor structure into a bifactor so- lution and to graph both structures (omega.graph) and to calculate reliability coefficients alpha (score.items), beta (ICLUST) and McDonald’s omega (omega and omega.graph). Additional functions make for more convenient descriptions of item characteristics. Functions un- der development include 1 and 2 parameter Item Response measures. A number of procedures have been developed as part of the Synthetic Aperture Personality Assess- ment (SAPA) project. These routines facilitate forming and analyzing composite scales equivalent to using the raw data but doing so by adding within and between cluster/scale item correlations. These functions include extracting clusters from factor loading matrices (factor2cluster), synthetically forming clusters from correlation matrices (cluster.cor), and finding multiple correlation from correlation matrices (mat.regress). 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/contrib/ Details The psych package is a combination of multiple source files maintained at the http://personality-project. org/r repository: “useful.r", VSS.r., ICLUST.r, omega.r, etc.“useful.r" is a set of routines for easy data entry (read.clipboard), simple descriptive statistics (describe), and splom plots com- bined with correlations (pairs.panels, adapted from the help files of pairs). The VSS routines allow for testing the number of factors (VSS), showing plots (VSS.plot) of goodness of fit, and basic routines for estimating the number of factors/components to extract by examining the scree plot (VSS.scree) or comparing with the scree of an equivalent matrix of random numbers (VSS.parallel). In addition, there are routines for hierarchical factor analysis using Schmid Leiman tranformations (omega, omega.graph) as well as Item Cluster analysis (ICLUST, ICLUST.graph). The more important functions in the package are for the analysis of multivariate data, with an emphasis upon those functions useful in scale construction of item composites. 4 00psych-package When given a set of items from a personality inventory, one goal is to combine these into higher level item composites. This leads to several questions: 1) What are the basic properties of the data? describe reports basic summary statistics (mean, sd, median, mad, range, minimum, maximum, skew, kurtosis, standard error) for vectors, columns of matrices, or data.frames. describe.by provides descriptive statistics, organized by a grouping variable. pairs.panels shows scatter plot matrices (SPLOMs) as well as histograms and the Pearson correlation for scales or items. error.bars will plot variable means with associated confidence intervals. 2) What is the most appropriate number of item composites to form? After finding either standard Pearson correlations, or finding tetrachoric or polychoric correlations using a wrapper (poly.mat) for John Fox’s hetcor function, the dimensionality of the correlation matrix may be examined. The number of factors/components problem is a standard question of factor analysis, cluster analysis, or principal components analysis. Unfortunately, there is no agreed upon answer. The Very Simple Structure (VSS) set of procedures has been proposed as on answer to the question of the optimal number of factors. Other procedures (VSS.scree, VSS.parallel, and fa.parallel) also address this question. 3) What are the best composites to form? Although this may be answered using principal compo- nents (principal) or factor analysis (factor.pa) and to show the results graphically (fa.graph), it is sometimes more useful to address this question using cluster analytic techniques. (Better yet is to use maximum likelihood factor analysis using factanal from the stats package.) Previous ver- sions of ICLUST (e.g., Revelle, 1979) have been shown to be particularly successful at doing this. Graphical output from ICLUST.graph uses the Graphviz dot language and allows one to write files suitable for Graphviz. 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 (score.items), (Revelle’s) Beta (ICLUST), and (McDonald’s) omega. Functions to estimate all three of these are included in psych. 5) For some applications, data matrices are synthetically combined from sampling different items for different people. So called Synthetic Aperture Personality Assessement (SAPA) techniques al- low the formation of large correlation or covariance matrices even though no one person has taken all of the.