qmethod (version 1.8)

build.q.set: Q methodology: sample a Q set from a concourse


Subsets a concourse of items into a sample of selected items. Returns a dataframe with handles as row names, and languages (if applicable) as columns.


build.q.set(q.concourse, q.sample, q.distribution)



A matrix with handles as row names, (optional) languages as columns, and full item wordings in cells as produced by import.q.concourse.


A character vector of handles (such as q-is-great). The items identified by the handles will be sampled.


The chosen Q distribution as a vector of integers, such as c(1,3,1).


Returns a matrix with handles as row names, languages (if applicable) as column names and full item wordings in cells.


Q studies are carried out letting participants rank a sample of statements (items), collectively referred to as the Q set. These Q sets are drawn (by some sampling strategy) from a concourse, or universe of items. This function subsets the concourse generated by import.q.concourse, based on a vector of handles provided, and returns it as q.set.

The function implements a number of tests on the validity and consistency of inputs.

If you are not familiar with the terminology of item handle, ID and wording or the file structure expected for import functions, please read the respective sections in the documentation for qmethod-package first or consider the package wiki.

See Also

import.q.concourse, import.q.feedback, import.q.sorts, make.cards


Run this code
# Build a Q Set from a concourse and a sample
q.set <- build.q.set(
  q.concourse = importexample$q.concourse,  # as created by import.q.concourse
  q.sample = c("life-with-q","q-uprising","r-dominance","small-village"),
  # add vector with items to be selected from concourse
  # q.sample is ideally read in from a separate *.CSV file
  q.distribution = c(1,2,1) # very simple distribution
# }

Run the code above in your browser using DataCamp Workspace