print.psych {psych} | R Documentation |
Print and summary functions for the psych class
Description
Give limited output (print) or somewhat more detailed (summary) for most of the functions in psych.
Usage
## S3 method for class 'psych'
print(x,digits=2,all=FALSE,cut=NULL,sort=FALSE,short=TRUE,lower=TRUE,signif=NULL,...)
## S3 method for class 'psych'
summary(object,digits=2,items=FALSE,...)
Arguments
x |
Output from a psych function (e.g., factor.pa, omega,ICLUST, score.items, cluster.cor |
object |
Output from a psych function |
items |
items=TRUE (default) does not print the item whole correlations |
digits |
Number of digits to use in printing |
all |
if all=TRUE, then the object is declassed and all output from the function is printed |
cut |
Cluster loadings < cut will not be printed. For the factor analysis functions (fa and factor.pa etc.), cut defaults to 0, for ICLUST to .3, for omega to .2. |
sort |
Cluster loadings are in sorted order |
short |
Controls how much to print |
lower |
For square matrices, just print the lower half of the matrix |
signif |
If not NULL, a numeric value, show just signif number of leading digits for describe output |
... |
More options to pass to summary and print |
Details
Most of the psych functions produce too much output. print.psych and summary.psych use generic methods for printing just the highlights. To see what else is available, ask for the structure of the particular object: (str(theobject) ).
Alternatively, to get complete output, unclass(theobject) and then print it. This may be done by using the all=TRUE option.
As an added feature, if the promax function is applied to a factanal loadings matrix, the normal output just provides the rotation matrix. print.psych will provide the factor correlations. (Following a suggestion by John Fox and Uli Keller to the R-help list). The alternative is to just use the Promax function directly on the factanal object.
Value
Various psych functions produce copious output. This is a way to summarize the most important parts of the output of the score.items, cluster.scores, and ICLUST functions. See those ( score.items
, cluster.cor
, cluster.loadings
, or ICLUST
) for details on what is produced.
The signf option is available for the output from describe
to adjust the number of digits shown for all columns. This is slightly different from what happens if you specify digits, which rounds all output to the number of digits. print(x,signif=3) will print just the 3 largest digits of x, which will frequently result in scientific notation for any column where that would be appropriate for at least one row.
Note
See score.items
, cluster.cor
, cluster.loadings
, or ICLUST
for details on what is printed.
Author(s)
William Revelle
Examples
data(bfi)
keys.list <- list(agree=c(-1,2:5),conscientious=c(6:8,-9,-10),
extraversion=c(-11,-12,13:15),neuroticism=c(16:20),openness = c(21,-22,23,24,-25))
keys <- make.keys(25,keys.list,item.labels=colnames(bfi[1:25]))
scores <- scoreItems(keys,bfi[1:25])
scores
summary(scores)