#### Example
require('qmethod')
require ("psych")
# Load data
data("lipset")
lip <- lipset[[1]]
# Correlation matrix
corlip <-cor(lip)
# Centroid extraction
lipcent <- centroid(corlip)
lipcent
## To finalise the full analysis, continue with the following steps
# Rotation (in this example, varimax over 3 factors)
vmax <- varimax(lipcent[,1:3])
# Automatic pre-flagging of Q-sorts
flags <- qflag(unclass(vmax$loadings), nstat = 33)
# Calculate z-scores and general characeristics
results <- qzscores(lip, 3, loa=vmax$loadings, flagged=flags)
summary(results)
# Consensus and distinguishing statements
results$qdc <- qdc(lip, 3, zsc=results$zsc, sed=results$f_char$sd_dif)
plot(results)
## All of the above can be done with:
results2 <- qmethod(lip, 3, extraction="centroid")
Run the code above in your browser using DataLab