Learn R Programming

WrightMap (version 1.4)

plotCI: Plotting confidence intervals and DIF

Description

The plotCI function is intended for graphing confidence intervals. The difplot function is a wrapper for plotCI specifcally intended for examining Differential Item Functioning from ConQuest output.

Usage

plotCI(ests, errors, labels = "", zeroline = TRUE, incol = "gray", outcol = "blue"
, main.title = "Statistical Significance Plot", axes = FALSE, xlab = "", pch = 16, ...)
# S3 method for default
difplot(data, grouptype = NULL, group = NULL, item.names = NULL
, ylim = c(-1, 1), ylab = NULL, ...)
# S3 method for CQmodel
difplot(data, table.name = NULL, grouptype = NULL
, group = NULL, ...)
# S3 method for character
difplot(data, equation, ...)

Arguments

plotCI parameters:

ests

vector of point estimates.

errors

vector of standard errors.

labels

vector of labels for the items.

zeroline

logical indicating whether to draw a line at zero.

incol

color of intervals containing zero.

outcol

color of intervals not containing zero.

main.title

title of the plot.

axes,xlab,pch

parameters passed to plot.

difplot parameters:

data

A CQmodel object or the name of a ConQuest show file. Can also be a table of parameters taken from ConQuest output.

table.name

The RMP table to use for parameters. Should be an interactions table.

grouptype

The name of the demographic variable (e.g. ``gender'').

group

The name of the group to test for DIF (e.g. ``male'').

item.names

vector of item names.

equation

string specifying the model equation, if the Summary of Estimation table was not included in the show file.

ylim,ylab

more parameters passed to plot.

...

additional parameters to pass to plot.

Author

David Torres Irribarra and Rebecca Freund

Details

The plotCI function takes point estimates and standard errors as inputs and plots 95 percent confidence intervals in relation to a zero-line. By default, it colors the intervals gray if they include zero, and blue if they do not. The difplot function is a wrapper for plotCI specifcally intended for examining Differential Item Functioning from ConQuest output and expects tables formatted exactly like ConQuest output to work correctly. For plotting DIF from other statistical packages, it is recommended to use plotCI directly.

Examples

Run this code
	#Plotting confidence intervals
	
	ests <- rnorm(10,sd = .5)
	errors <- runif(10,min = .1,max = .5)
	plotCI(ests,errors,ylim = c(-3,3))
	
	#DIF plot:
	
	fpath <- system.file("extdata", package="WrightMap")

	# equation must be specified because there is no summary of estimation 
	# table in this example
	difplot(file.path(fpath,"ex6a.shw"), equation = "item-gender+item*gender") 

Run the code above in your browser using DataLab