item_overview: Item Overview

View source: R/item_overview.R

item_overviewR Documentation

Item Overview

Description

Shows all (squared) factor loadings of all items in all models in a plot grid of bar plots.

Usage

item_overview(
  data,
  tests = "all",
  facets = "all",
  squared = TRUE,
  file_name = "none",
  dpi = 500,
  color = NULL,
  font = "sans",
  size_font = 1,
  wrap = 1,
  width = 1,
  height = 1
)

Arguments

data

Object of class IPV as created by the function 'ipv_est'

tests

character; vector of tests to be included in the overview; defaults to 'all', in which case all are displayed

facets

character; vector of facets to be included in the overview; defaults to 'all', in which case all are displayed

squared

logical; should factor loadings be squared?; defaults to TRUE

file_name

character; name of the file to save. Supported formats are: "pdf" (highest quality and smallest file size), "png", "jpeg"; defaults to "none".

dpi

integer; resolution in dots per inch for "png" and "jpeg" files; defaults to 500.

color

character; vector of hex codes for colors; defaults to the colors "#DAD8D8" (gray), "#11C1FF" (light blue), and "#007AD6" (blue)

font

character; font of the plot labels; defaults to "sans"

size_font

integer; size of the fonts relative to default; defaults to 1

wrap

integer; number of rows of plots per facet; defaults to 1

width

integer; factor to scale the overall width of the file with; defaults to 1

height

integer; factor to scale the overall height of the file with; defaults to 1

Details

File output produces much more reliable results than display within R. Display within R may scatter elements of the chart and distort the overall appearance.

Value

gg / ggplot object; plot grid with one bar plot per item showing (squared) factor loadings of that item in all IPV models, arranged by facets and tests

Examples

# Honesty/Humility and Agreeableness items
# the use of file output is recommended
# to prevent irregular placement of plot labels
# Estimation takes some time.
## Not run: res <- ipv_est(
  HEXACO[ ,grep("^H|^A", names(HEXACO))],
  "HA")
item_overview(res)
## End(Not run) # file output is recommended (see details)



IPV documentation built on Sept. 30, 2022, 5:08 p.m.