graphicalTest: Function to produce graphical test plot

Description Usage Arguments References Examples

View source: R/anchorpoint.R

Description

Function to produce graphical test plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
graphicalTest(
  object,
  shift = NULL,
  highlight = NULL,
  alpha = 0.05,
  testColors = list(`not significant` = "darkgreen", significant = "red3", anchoritem =
    "black"),
  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)

highlight

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

alpha

significance level for DIF test

testColors

list with colors for the items:

  • "not significant" = "darkgreen"

  • "significant" = "red3"

  • "anchoritem" = "black"

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

...

further arguments for plot() like lty, cex.axis, cex.main, cex.lab etc.

References

Credit: Part of the code is adapted from the function plotGOF of the package eRm (Version: 1.32.1):

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 graphical test
graphicalTest(ap_object)

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