qmethod (version 1.8)

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

Description

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.

Usage

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

Value

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

Arguments

q.concourse

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

q.sample

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

q.distribution

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

Author

Maximilian Held

Details

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

Examples

Run this code
# Build a Q Set from a concourse and a sample
data(importexample)
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