shiftPlot: Function to produce a shift plot

Description Usage Arguments Examples

View source: R/anchorpoint.R

Description

Function to produce a shift plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
shiftPlot(
  object,
  shift = NULL,
  testColors = list(`not significant` = "darkgreen", significant = "red3", anchoritem =
    "black"),
  testPCH = list(`not significant` = 21, significant = 22, anchoritem = 23),
  addLegend = TRUE,
  highlight = NULL,
  digits = 3,
  cex.legend = 0.75,
  TestResults = NULL,
  ask = TRUE,
  ...
)

Arguments

object

anchorpoint object as produced by the function anchorpoint

shift

shift in item parameters for the second group, default NULL (for global optimum), else numeric (for user-defined shift)

testColors

list with colors for the items:

  • "not significant" = "darkgreen"

  • "significant" = "red3"

  • "anchoritem" = "black"

testPCH

list with pch for the items (for color blind people):

  • "not significant" = 21

  • "significant" = 22

  • "anchoritem" = 23

addLegend

logic, add a legend to the plot, default: False

highlight

positive integer(s), numbers of the items to be highlighted

digits

positive integer, controls rounding of the shift in title

cex.legend

numeric, controls size of legend

TestResults

Waldtest object from anchorpoint::getWald. If NULL, then they are computed within the function. Default: NULL.

ask

logical, ask for next plot. Default = TRUE

...

additional graphics arguments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Load the SPISA data set (general knowledge quiz - more information at ?SPISA)
library("psychotree")
data("SPISA")

# Fit the Rasch Models for the two groups females and males
fit <- raschFit(SPISA, resp.mat.name='spisa', group.name='gender')

# Rasch Model fit for the first and second group
rm1 <- fit$rm1
rm2 <- fit$rm2

# Fit an Anchorpoint object
ap_object <- anchorpoint(rm1,rm2,select = "Gini Index", grid = "sparse")

# Use the Anchorpoint object to get the shift plot
shiftPlot(ap_object)

lucasmanuelkohler/anchorpoint documentation built on April 16, 2021, 6:41 a.m.