Takes an object of class QmethodRes
resulting from qmethod
and makes a dot-chart with the z-scores for statements and all factors.
# S3 method for QmethodRes
plot(x, xlab = 'z-scores', ylab = 'statements',
pchlist = NULL, colours = NULL,
fnames = NULL, legend = TRUE,
dist = TRUE, pchlist.fill = NULL,
leg.pos="bottomright", xlim= NULL,
sort.items=T, factors = NULL,
...)
results object returned by qmethod
.
label for x axis. Defaults to 'z-scores'.
label for y axis. Defaults to 'statements'.
array of pch
symbols to be used in plotting the points for each factor. Defaults to a pre-defined set of symbols.
array of colours to be used when plotting the points for each perspective. Defaults to a pre-defined set of colours based on the rainbow
palette.
names for factors to be used in the legend. In results where factor names have not been changed (using, e.g. q.fnames
) it defaults to 'Factor 1'
, 'Factor 2'
, etc.
logical; if FALSE
, no legend
will be drawn.
Logical. Should distinguishing statements be indicated in the plot dots? If TRUE
, then the z-score values that are distinguishing for a given statement and factor are represented with a different (filled) symbol.
List of symbols to indicate distinguishing statements. By default, this is set to NULL
, which provides a set of symbols that coincides with those in pchlist
, but filled.
Position of the legend.
Limits for the x axis, given as a vector of two numbers. If this is not provided, the limits are calculated from the sample.
Whether and how the items are sorted in the vertical axis. Defaults to TRUE
, which sorts the items according to the standard deviation of their z-scores for all factors; items of most disagreement are placed at the top. To invert this order (items of most disagreement at the bottom), set this argument to "consensus.top" A value of FALSE
will not sort the items, and these are displayed in the same order as in the raw data. A numerical vector can also be provided in order to sort the statements manually: the vector needs to have the same length as the number of items, and provides the order in which the items are to be ordered.
The factors to plot. Defaults to NULL
, which plots all the factors in the object x
in the order given. To print a subset of these factors or to print them in a different order, provide a numeric vector here with the factors and the order desired, e.g. c(2,1)
.
other arguments for plot
.
Aiora Zabala
This specific dotchart visualisation of Q results implemented in plot.QmethodRes
was first developed and introduced in this R package, in preparation for the study published in Zabala et al. (2017).
Zabala, A., 2014. qmethod: A Package to Explore Human Perspectives Using Q Methodology. The R Journal, 6(2):163-173.
Available from: https://journal.r-project.org/archive/2014-2/zabala.pdf.
Zabala, A., Pascual, U. and Garcia-Barrios, L. 2017. Payments for Pioneers? Revisiting the Role of External Rewards for Sustainable Innovation under Heterogeneous Motivations. Ecological Economics, 135:234-245.
Available from: https://www.sciencedirect.com/science/article/pii/S0921800916302683/.
data(lipset)
results <- qmethod(lipset[[1]], nfactors = 3, rotation = "varimax")
title <- "Q method z-scores, lipset dataset"
subtitle <- paste0("Three factors, PCA, varimax. Printed on ",
Sys.Date())
plot(results, main = title, sub = subtitle)
# Order the items in a different way
plot(results, main = title, sub = subtitle,
sort.items = c(rev(1:nrow(results$zsc))))
Run the code above in your browser using DataLab