constructPca: Performs a principal component analysis (PCA) of...

Description Usage Arguments Value Author(s) References Examples

View source: R/calc.r

Description

Performs a principal component analysis (PCA) of inter-construct correlation matrix. Various methods for rotation and methods for the calculation of the correlations are available. Note that the number of factors has to be specified. For more information on the PCA function itself type ?principal.

Usage

1
2
3
constructPca(x, nfactors=3, rotate="varimax", method=c("pearson",
    "kendall", "spearman"), trim=NA, digits=2, cutoff=0,
    output=1)

Arguments

x

repgrid object.

nfactors

Number of components to extract (default is 3).

rotate

"none", "varimax", "promax" and "cluster" are possible rotations (default is none).

method

A character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall" or "spearman", can be abbreviated. The default is "pearson".

trim

The number of characters a construct is trimmed to (default is 7). If NA no trimming occurs. Trimming simply saves space when displaying correlation of constructs with long names.

digits

Numeric. Number of digits to round to (default is 2).

cutoff

Loadings smaller than cutoff are not printed.

output

The type of output printed to the console. output=0 will supress printing of the output. output=1 (default) will print results to the screen. output==2 will invisibly retrn the whole object from principal not only the loadings.

Value

Invisibly returns a matrix of loadings on the principal components.

Author(s)

Mark Heckmann

References

Fransella, F., Bell, R. & Bannister, D. (2003). A Manual for Repertory Grid Technique (2. Ed.). Chichester: John Wiley & Sons.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 

# data from grid manual by Fransella et al. (2003, p. 87)
# note that the construct order is different
constructPca(fbb2003, nf=2)

# surpress printing to console            
m <- constructPca(fbb2003, nf=2)
m

# no rotation
constructPca(fbb2003, rotate="none")

# using a different correlation matrix (Spearman)
constructPca(fbb2003, method="spearman")  


## End(Not run)

OpenRepGrid documentation built on May 31, 2017, 2:32 a.m.