qmethod (version 1.5.5)

plot.QmethodRes: Q Method: plot for statement z-scores


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. A value of FALSE will not sort the items, which 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.

See Also

dotchart and points.


Run this code
results <- qmethod(lipset[[1]], nfactors = 3, rotation = "varimax")
title <- "Q method z-scores, lipset dataset"
subtitle <- paste0("Three factors, PCA, varimax. Printed on ",
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 DataCamp Workspace