View source: R/plot.QmethodRes.R
plot.QmethodRes | R Documentation |
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 class '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,
...)
x |
results object returned by |
xlab |
label for x axis. Defaults to 'z-scores'. |
ylab |
label for y axis. Defaults to 'statements'. |
pchlist |
array of |
colours |
array of colours to be used when plotting the points for each perspective. Defaults to a pre-defined set of colours based on the |
fnames |
names for factors to be used in the legend. In results where factor names have not been changed (using, e.g. |
legend |
logical; if |
dist |
Logical. Should distinguishing statements be indicated in the plot dots? If |
pchlist.fill |
List of symbols to indicate distinguishing statements. By default, this is set to |
leg.pos |
Position of the legend. |
xlim |
Limits for the x axis, given as a vector of two numbers. If this is not provided, the limits are calculated from the sample. |
sort.items |
Whether and how the items are sorted in the vertical axis. Defaults to |
factors |
The factors to plot. Defaults to |
.
... |
other arguments for |
The names of items to be plotted are taken from the matrix x$zsc
.
To change these names, change the row names in that matrix first, e.g.:
rownames(x$zsc) <- vector.of.item.names
.
If the margin width is not enough to read the items, specify par(mai=...)
first. See par
for details.
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/.
dotchart
and points
.
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))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.