plot_blackbox: Alternative plotting function for Blackbox Scaling Results

View source: R/asmcjr.r

plot_blackboxR Documentation

Alternative plotting function for Blackbox Scaling Results

Description

Uses ggplot2 to produce alternative visualizations for results of the blackbox function. Makes a scatterplot of respondents on the estimated latent dimensions.

Usage

plot_blackbox(result, dims, whichRes = NULL, groupVar = NULL, issueVector = NULL,
    data = NULL, missing = NULL, rug = FALSE, xlab = NULL, main = NULL,
    ylab = NULL, nudgeX = NULL, nudgeY = NULL, ...)

Arguments

result

An object of class blackbox that is the result of an Blackbox scaling analysis.

dims

A numeric vector of two values giving the dimension numbers to be plotted. c(1,2) will plot the first two dimensions.

whichRes

Identifies the dimensionality of the result to be used. For example, if you set dims=c(1,2), but you estimated a three-dimensional solution, you could use either the two-dimensional or three-dimensional solution for the plot. If whichRes is NULL (the default), the smallest dimesnsionality that will accommodate the request is used.

groupVar

Optional grouping variable that will paritition the observations to produce different density cuvres for aldmck results.

issueVector

Either column names or numbers of issues whose normal vectors should be plotted in the space along with respondents.

data

Data frame used to estimate the solution. Only required if you specify something other than NULL for issueVector.

missing

A vector of values that will be recoded to missing in the analysis.

rug

Logical indicating whether marginal rug-plots should be included.

xlab

Optional x-label for the plot.

main

Optional main title for the plot.

ylab

Optional y-label for the plot.

nudgeX, nudgeY

Factor by which text labels will be nudged in the x- and y- dimensions.

...

Other arguments to be passed down, currently unimplemented.

Value

A ggplot of the stimulus locations and density of ideal points.

See Also

blackbox


davidaarmstrong/asmcjr documentation built on June 29, 2024, 12:07 p.m.