Using the qmethod package in R for analysis

Christoph Schulze

2026-06-19

What is R?

flowchart TD
  CRAN[("CRAN<br/>online package repository")]
  LIB["Package library<br/>installed on your computer"]
  PKG["Packages<br/>e.g. qmethod, ggplot2"]
  R["R<br/>the language &amp; engine<br/>that actually runs code"]
  RS["RStudio<br/>IDE: editor · console · plots"]

  subgraph PROJ["R Project · .Rproj <br/>(one self-contained folder)"]
    direction LR
    SCRIPT[".R scripts<br/>the code you write"]
    DATA["data"]
    OUT["outputs<br/>figures, tables, reports"]
  end

  CRAN -->|"install.packages()"| LIB
  LIB -->|"library() loads them"| PKG
  PKG -->|"add functions to"| R
  RS -->|"friendly front-end for"| R
  SCRIPT -->|"written &amp; edited in"| RS
  RS -->|"sends code to be run by"| R
  SCRIPT -.->|"call functions from"| PKG
  SCRIPT -->|"reads"| DATA
  SCRIPT -->|"writes"| OUT
  PROJ -->|"opened in RStudio;<br/>sets the working directory"| RS

  classDef engine fill:#2f6f5e,stroke:#eef3ec,color:#ffffff;
  classDef ide fill:#3a5a8c,stroke:#eef3ec,color:#ffffff;
  classDef store fill:#7a6a3f,stroke:#f3efdd,color:#ffffff;
  class R engine;
  class RS ide;
  class CRAN,LIB,PKG store;

What is this & who did this?

This package is made by Zabala (2014)

  • not for collecting data
  • not meant for analysing qualitative q data
  • but for analysis of quantitative q data
    • how many factors are in my dataset?
    • which respondents belong to a factor?
    • how strong is a respondents adhering to a specific factor?
    • what are consensus and what are distinguishing statements?
    • which statements characterise a factor?

Getting into the code

Loading data

1library(qmethod)

#before importing data, delete in excel first column and save as csv file
2qstake <- read.csv("01_data/qstake.csv", header=TRUE, sep=";",dec=".")

#for some reason line 43 are pure na's. next command will delete na's of the dataframe qdata
qstake <-na.omit(qstake)

#look into correlation of q-sets
3cor(qstake)
1
Loading package
2
Loading data
3
Checking correlations among Q-sorts

Extracting factors

results <- qmethod(qstake, nfactors = 3, cor.method="spearman", rotation = "varimax")
Q-method analysis.
Finished on:               Fri Jun 19 16:11:10 2026
'qmethod' package version: 1.8.4
Original data:             38 statements, 25 Q-sorts
Forced distribution:       TRUE
Number of factors:         3
Extraction:                PCA
Rotation:                  varimax
Flagging:                  automatic
Correlation coefficient:   spearman

Extracting factors

round(results$loa, digits = 2)
          f1    f2    f3
Resp1   0.14  0.81  0.11
Resp2   0.18  0.59  0.40
Resp3   0.79  0.19  0.26
Resp4   0.39  0.45  0.23
Resp5   0.61  0.64 -0.02
Resp6   0.62  0.53  0.06
Resp7   0.22  0.72  0.07
Resp8   0.66  0.09  0.32
Resp9   0.37  0.33  0.61
Resp10  0.52  0.56  0.10
Resp11  0.25  0.40  0.44
Resp12  0.70  0.23  0.25
Resp13  0.57  0.12  0.54
Resp14  0.47  0.08  0.33
Resp15  0.64  0.20  0.02
Resp16  0.67  0.03  0.40
Resp17  0.03  0.84  0.10
Resp18  0.50  0.22  0.14
Resp19  0.52  0.52  0.14
Resp20  0.28  0.05  0.70
Resp21 -0.10  0.40  0.69
Resp22  0.61  0.35  0.28
Resp23  0.23 -0.06  0.68
Resp24  0.45  0.51  0.33
Resp25  0.32  0.42  0.46

Extracting factors

results$flag
       flag_f1 flag_f2 flag_f3
Resp1    FALSE    TRUE   FALSE
Resp2    FALSE    TRUE   FALSE
Resp3     TRUE   FALSE   FALSE
Resp4    FALSE    TRUE   FALSE
Resp5    FALSE    TRUE   FALSE
Resp6     TRUE   FALSE   FALSE
Resp7    FALSE    TRUE   FALSE
Resp8     TRUE   FALSE   FALSE
Resp9    FALSE   FALSE    TRUE
Resp10   FALSE    TRUE   FALSE
Resp11   FALSE   FALSE   FALSE
Resp12    TRUE   FALSE   FALSE
Resp13    TRUE   FALSE   FALSE
Resp14    TRUE   FALSE   FALSE
Resp15    TRUE   FALSE   FALSE
Resp16    TRUE   FALSE   FALSE
Resp17   FALSE    TRUE   FALSE
Resp18    TRUE   FALSE   FALSE
Resp19   FALSE   FALSE   FALSE
Resp20   FALSE   FALSE    TRUE
Resp21   FALSE   FALSE    TRUE
Resp22    TRUE   FALSE   FALSE
Resp23   FALSE   FALSE    TRUE
Resp24   FALSE   FALSE   FALSE
Resp25   FALSE   FALSE   FALSE

Extracting factors

loa.and.flags(results)
       fg1    f1 fg2    f2 fg3    f3
Resp1       0.14   *  0.81      0.11
Resp2       0.18   *  0.59      0.40
Resp3    *  0.79      0.19      0.26
Resp4       0.39   *  0.45      0.23
Resp5       0.61   *  0.64     -0.02
Resp6    *  0.62      0.53      0.06
Resp7       0.22   *  0.72      0.07
Resp8    *  0.66      0.09      0.32
Resp9       0.37      0.33   *  0.61
Resp10      0.52   *  0.56      0.10
Resp11      0.25      0.40      0.44
Resp12   *  0.70      0.23      0.25
Resp13   *  0.57      0.12      0.54
Resp14   *  0.47      0.08      0.33
Resp15   *  0.64      0.20      0.02
Resp16   *  0.67      0.03      0.40
Resp17      0.03   *  0.84      0.10
Resp18   *  0.50      0.22      0.14
Resp19      0.52      0.52      0.14
Resp20      0.28      0.05   *  0.70
Resp21     -0.10      0.40   *  0.69
Resp22   *  0.61      0.35      0.28
Resp23      0.23     -0.06   *  0.68
Resp24      0.45      0.51      0.33
Resp25      0.32      0.42      0.46

Looking at factors

  • number of Q-sorts
  • Size of Eigenvalues
  • Share of variacne explained
results$f_char$characteristics
   av_rel_coef nload eigenvals expl_var reliability se_fscores
f1         0.8    10  5.786761 23.14705   0.9756098  0.1561738
f2         0.8     7  4.900121 19.60048   0.9655172  0.1856953
f3         0.8     4  3.486081 13.94432   0.9411765  0.2425356
humphrey<-2/sqrt(dim(qstake))
humphrey[1]
[1] 0.3244428

Humphrey’s rule:

  • select to highest two factor loadings and multiply these
  • compare product to humphreys critical value

Looking at factors

Looking at factors

summary(results)
Q-method analysis.
Finished on:               Fri Jun 19 16:11:10 2026
'qmethod' package version: 1.8.4
Original data:             38 statements, 25 Q-sorts
Forced distribution:       TRUE
Number of factors:         3
Extraction:                PCA
Rotation:                  varimax
Flagging:                  automatic
Correlation coefficient:   spearman

Factor scores
   fsc_f1 fsc_f2 fsc_f3
1      -2      0      3
2      -4     -4     -2
3       0     -2     -3
4      -1      3      0
5       3      3      1
6      -3     -3     -4
7       0      2      0
8       1      2      4
9       0      0      2
10     -2      0     -1
11      1     -1      2
12      2      0      3
13      3      1     -2
14     -1      3     -1
15      1     -2      4
16     -2     -3     -2
17     -4      1     -4
18      2      1      1
19      4      0      0
20      0      2      0
21      1      2      1
22      2      4      1
23      1      4      3
24     -1     -1      0
25      1      0     -1
26     -3     -4     -3
27      3      1      1
28     -1     -1      0
29     -3     -2     -1
30      4      1      2
31      0      0      1
32      2     -1     -1
33      0      1     -1
34     -2     -1      2
35      0      0      0
36     -1     -1     -2
37     -1     -3     -3
38      0     -2      0
                                    f1    f2    f3
Average reliability coefficient   0.80  0.80  0.80
Number of loading Q-sorts        10.00  7.00  4.00
Eigenvalues                       5.79  4.90  3.49
Percentage of explained variance 23.15 19.60 13.94
Composite reliability             0.98  0.97  0.94
Standard error of factor scores   0.16  0.19  0.24

Looking at statement evaluations

plot(results)

Note:

  • this graph is super helpful, but might appear too small in your window
  • in RStudio you can click on Zoom to extend it and export it in better quality on your computer

Looking at statement evaluations

scores <- cbind(round(results$zsc, digits=2), results$zsc_n) 
nfactors <- ncol(results$zsc) 
col.order <- as.vector(rbind(1:nfactors, (1:nfactors)+nfactors)) 
scores <- as.data.frame(scores)
scores
   zsc_f1 zsc_f2 zsc_f3 fsc_f1 fsc_f2 fsc_f3
1   -0.76  -0.20   1.69     -2      0      3
2   -2.04  -1.75  -1.15     -4     -4     -2
3    0.03  -0.97  -1.52      0     -2     -3
4   -0.62   1.43   0.01     -1      3      0
5    1.12   1.17   0.61      3      3      1
6   -1.61  -1.61  -1.93     -3     -3     -4
7    0.39   1.16   0.42      0      2      0
8    0.87   1.10   1.80      1      2      4
9    0.49  -0.14   0.82      0      0      2
10  -1.06   0.15  -0.55     -2      0     -1
11   0.56  -0.80   0.85      1     -1      2
12   1.08   0.01   1.02      2      0      3
13   1.23   0.81  -0.87      3      1     -2
14  -0.55   1.36  -0.53     -1      3     -1
15   0.66  -0.90   1.77      1     -2      4
16  -0.75  -1.23  -1.18     -2     -3     -2
17  -1.82   0.49  -1.97     -4      1     -4
18   0.87   0.30   0.65      2      1      1
19   1.52   0.11   0.52      4      0      0
20   0.43   0.96  -0.14      0      2      0
21   0.66   1.08   0.76      1      2      1
22   0.99   1.50   0.66      2      4      1
23   0.75   1.68   0.93      1      4      3
24  -0.56  -0.80   0.20     -1     -1      0
25   0.61   0.30  -0.33      1      0     -1
26  -1.76  -1.88  -1.23     -3     -4     -3
27   1.24   0.63   0.58      3      1      1
28  -0.61  -0.54   0.12     -1     -1      0
29  -1.51  -1.11  -0.54     -3     -2     -1
30   1.36   0.91   0.85      4      1      2
31  -0.17   0.02   0.60      0      0      1
32   1.09  -0.38  -0.51      2     -1     -1
33   0.01   0.51  -0.30      0      1     -1
34  -1.00  -0.41   0.93     -2     -1      2
35  -0.22  -0.06  -0.26      0      0      0
36  -0.72  -0.28  -0.98     -1     -1     -2
37  -0.50  -1.69  -1.60     -1     -3     -3
38   0.26  -0.93  -0.24      0     -2      0

Looking at statement evaluations

scores[order(scores$zsc_f1, decreasing = T), ]
   zsc_f1 zsc_f2 zsc_f3 fsc_f1 fsc_f2 fsc_f3
19   1.52   0.11   0.52      4      0      0
30   1.36   0.91   0.85      4      1      2
27   1.24   0.63   0.58      3      1      1
13   1.23   0.81  -0.87      3      1     -2
5    1.12   1.17   0.61      3      3      1
32   1.09  -0.38  -0.51      2     -1     -1
12   1.08   0.01   1.02      2      0      3
22   0.99   1.50   0.66      2      4      1
8    0.87   1.10   1.80      1      2      4
18   0.87   0.30   0.65      2      1      1
23   0.75   1.68   0.93      1      4      3
15   0.66  -0.90   1.77      1     -2      4
21   0.66   1.08   0.76      1      2      1
25   0.61   0.30  -0.33      1      0     -1
11   0.56  -0.80   0.85      1     -1      2
9    0.49  -0.14   0.82      0      0      2
20   0.43   0.96  -0.14      0      2      0
7    0.39   1.16   0.42      0      2      0
38   0.26  -0.93  -0.24      0     -2      0
3    0.03  -0.97  -1.52      0     -2     -3
33   0.01   0.51  -0.30      0      1     -1
31  -0.17   0.02   0.60      0      0      1
35  -0.22  -0.06  -0.26      0      0      0
37  -0.50  -1.69  -1.60     -1     -3     -3
14  -0.55   1.36  -0.53     -1      3     -1
24  -0.56  -0.80   0.20     -1     -1      0
28  -0.61  -0.54   0.12     -1     -1      0
4   -0.62   1.43   0.01     -1      3      0
36  -0.72  -0.28  -0.98     -1     -1     -2
16  -0.75  -1.23  -1.18     -2     -3     -2
1   -0.76  -0.20   1.69     -2      0      3
34  -1.00  -0.41   0.93     -2     -1      2
10  -1.06   0.15  -0.55     -2      0     -1
29  -1.51  -1.11  -0.54     -3     -2     -1
6   -1.61  -1.61  -1.93     -3     -3     -4
26  -1.76  -1.88  -1.23     -3     -4     -3
17  -1.82   0.49  -1.97     -4      1     -4
2   -2.04  -1.75  -1.15     -4     -4     -2

Looking at statement evaluations

results$qdc
           dist.and.cons        f1_f2 sig_f1_f2       f1_f3 sig_f1_f3
1      Distinguishes all -0.559082411         * -2.44386587        6*
2  Distinguishes f3 only -0.283234506           -0.89040830        **
3  Distinguishes f1 only  0.995314755       ***  1.54750616        6*
4      Distinguishes all -2.041439221        6* -0.62109370         *
5              Consensus -0.056957901            0.50691520          
6              Consensus  0.003736641            0.32043042          
7  Distinguishes f2 only -0.769188781        ** -0.03345005          
8  Distinguishes f3 only -0.228645117           -0.92606143        **
9  Distinguishes f2 only  0.636665572        ** -0.32968573          
10 Distinguishes f2 only -1.210575598        6* -0.51072765          
11 Distinguishes f2 only  1.364319205        6* -0.28682766          
12 Distinguishes f2 only  1.073924970       ***  0.06031453          
13 Distinguishes f3 only  0.421430216            2.09975345        6*
14 Distinguishes f2 only -1.910097464        6* -0.02219517          
15     Distinguishes all  1.556712825        6* -1.11393550       ***
16                        0.479643272         *  0.43095525          
17 Distinguishes f2 only -2.305283405        6*  0.14662743          
18                        0.567198560         *  0.21970559          
19 Distinguishes f1 only  1.412063581        6*  1.00022324       ***
20 Distinguishes f2 only -0.529633929         *  0.56132200          
21             Consensus -0.421235496           -0.10463314          
22 Distinguishes f2 only -0.506770944         *  0.33013467          
23 Distinguishes f2 only -0.926023165       *** -0.18412624          
24 Distinguishes f3 only  0.240931641           -0.75283163        **
25 Distinguishes f3 only  0.311217570            0.93757606        **
26                        0.121704695           -0.53266171          
27 Distinguishes f1 only  0.613421997         *  0.65941767         *
28 Distinguishes f3 only -0.066639363           -0.72543252         *
29                       -0.401710135           -0.96688685       ***
30             Consensus  0.451444563            0.51047007          
31                       -0.193616194           -0.77237602        **
32 Distinguishes f1 only  1.471020475        6*  1.60258125        6*
33 Distinguishes f2 only -0.504911694         *  0.30758292          
34     Distinguishes all -0.589385619         * -1.92590238        6*
35             Consensus -0.158946942            0.03653227          
36                       -0.441912029            0.25508654          
37 Distinguishes f1 only  1.191681949        6*  1.10432815       ***
38 Distinguishes f2 only  1.192857427        6*  0.50563870          
         f2_f3 sig_f2_f3
1  -1.88478346        6*
2  -0.60717380         *
3   0.55219141          
4   1.42034552       ***
5   0.56387310          
6   0.31669378          
7   0.73573873         *
8  -0.69741632         *
9  -0.96635130        **
10  0.69984795         *
11 -1.65114687        6*
12 -1.01361044       ***
13  1.67832324        6*
14  1.88790230        6*
15 -2.67064833        6*
16 -0.04868802          
17  2.45191084        6*
18 -0.34749297          
19 -0.41184035          
20  1.09095593       ***
21  0.31660236          
22  0.83690561        **
23  0.74189692         *
24 -0.99376327        **
25  0.62635849         *
26 -0.65436640         *
27  0.04599567          
28 -0.65879316         *
29 -0.56517672          
30  0.05902551          
31 -0.57875982          
32  0.13156078          
33  0.81249461        **
34 -1.33651676       ***
35  0.19547921          
36  0.69699857         *
37 -0.08735380          
38 -0.68721872         *

Looking at statement evaluations

results$qdc[order(results$qdc$f1_f2, decreasing = T), ]
           dist.and.cons        f1_f2 sig_f1_f2       f1_f3 sig_f1_f3
15     Distinguishes all  1.556712825        6* -1.11393550       ***
32 Distinguishes f1 only  1.471020475        6*  1.60258125        6*
19 Distinguishes f1 only  1.412063581        6*  1.00022324       ***
11 Distinguishes f2 only  1.364319205        6* -0.28682766          
38 Distinguishes f2 only  1.192857427        6*  0.50563870          
37 Distinguishes f1 only  1.191681949        6*  1.10432815       ***
12 Distinguishes f2 only  1.073924970       ***  0.06031453          
3  Distinguishes f1 only  0.995314755       ***  1.54750616        6*
9  Distinguishes f2 only  0.636665572        ** -0.32968573          
27 Distinguishes f1 only  0.613421997         *  0.65941767         *
18                        0.567198560         *  0.21970559          
16                        0.479643272         *  0.43095525          
30             Consensus  0.451444563            0.51047007          
13 Distinguishes f3 only  0.421430216            2.09975345        6*
25 Distinguishes f3 only  0.311217570            0.93757606        **
24 Distinguishes f3 only  0.240931641           -0.75283163        **
26                        0.121704695           -0.53266171          
6              Consensus  0.003736641            0.32043042          
5              Consensus -0.056957901            0.50691520          
28 Distinguishes f3 only -0.066639363           -0.72543252         *
35             Consensus -0.158946942            0.03653227          
31                       -0.193616194           -0.77237602        **
8  Distinguishes f3 only -0.228645117           -0.92606143        **
2  Distinguishes f3 only -0.283234506           -0.89040830        **
29                       -0.401710135           -0.96688685       ***
21             Consensus -0.421235496           -0.10463314          
36                       -0.441912029            0.25508654          
33 Distinguishes f2 only -0.504911694         *  0.30758292          
22 Distinguishes f2 only -0.506770944         *  0.33013467          
20 Distinguishes f2 only -0.529633929         *  0.56132200          
1      Distinguishes all -0.559082411         * -2.44386587        6*
34     Distinguishes all -0.589385619         * -1.92590238        6*
7  Distinguishes f2 only -0.769188781        ** -0.03345005          
23 Distinguishes f2 only -0.926023165       *** -0.18412624          
10 Distinguishes f2 only -1.210575598        6* -0.51072765          
14 Distinguishes f2 only -1.910097464        6* -0.02219517          
4      Distinguishes all -2.041439221        6* -0.62109370         *
17 Distinguishes f2 only -2.305283405        6*  0.14662743          
         f2_f3 sig_f2_f3
15 -2.67064833        6*
32  0.13156078          
19 -0.41184035          
11 -1.65114687        6*
38 -0.68721872         *
37 -0.08735380          
12 -1.01361044       ***
3   0.55219141          
9  -0.96635130        **
27  0.04599567          
18 -0.34749297          
16 -0.04868802          
30  0.05902551          
13  1.67832324        6*
25  0.62635849         *
24 -0.99376327        **
26 -0.65436640         *
6   0.31669378          
5   0.56387310          
28 -0.65879316         *
35  0.19547921          
31 -0.57875982          
8  -0.69741632         *
2  -0.60717380         *
29 -0.56517672          
21  0.31660236          
36  0.69699857         *
33  0.81249461        **
22  0.83690561        **
20  1.09095593       ***
1  -1.88478346        6*
34 -1.33651676       ***
7   0.73573873         *
23  0.74189692         *
10  0.69984795         *
14  1.88790230        6*
4   1.42034552       ***
17  2.45191084        6*

Looking at statement evaluations

Filtering statements, based one:

  • Consensus
  • Distinguishes all
  • Distinguishes f1
  • Distinguishes f1 only etc.
results$qdc[which(results$qdc$dist.and.cons == "Consensus"), ]
   dist.and.cons        f1_f2 sig_f1_f2       f1_f3 sig_f1_f3      f2_f3
5      Consensus -0.056957901            0.50691520           0.56387310
6      Consensus  0.003736641            0.32043042           0.31669378
21     Consensus -0.421235496           -0.10463314           0.31660236
30     Consensus  0.451444563            0.51047007           0.05902551
35     Consensus -0.158946942            0.03653227           0.19547921
   sig_f2_f3
5           
6           
21          
30          
35          

References

Zabala, Aiora. 2014. “Qmethod: A Package to Explore Human Perspectives Using q Methodology.”