Learn R Programming

WrightMap (version 1.4)

fitgraph: Item Fit Graphs

Description

This function creates a graphical summary of the item fit information.

Usage

# S3 method for default
fitgraph(fitEst, fitLB, fitUB, itemLabels, mainTitle = "Fit Plot", 
pch = 18, fitColours = c("gray70", "gray60", "gray50", "gray40", "gray0"), 
xlab = "Items", cex = 1.25, ...)
# S3 method for numeric
fitgraph(fitEst, fitLB, fitUB, itemLabels, mainTitle = "Fit Plot", 
pch = 18, fitColours = c("gray70", "gray60", "gray50", "gray40", "gray0"), 
xlab = "Items", cex = 1.25, ...)
# S3 method for CQmodel
fitgraph(fitEst, table = NULL, fit.type = "W", itemLabels = NULL, ...)
# S3 method for character
fitgraph(fitEst, ...)

Arguments

fitgraph arguments:

fitEst

vector of item fit estimates. Could also be a CQmodel object or name of a ConQuest show file.

fitLB

vector of lower bounds for critical intervals for each item.

fitUB

vector of upper bounds for critical intervals for each item.

itemLabels

vector of item labels.

mainTitle

string containing the title of the plot.

pch

number or vector indicating the type of symbols to be used for each item.

fitColours

Color that will be used to shade the critical inteval area.

xlab

Label of the x-axis. The default is `items`.

cex

Size of the x-axis label.

...

Additional parameters.

Argument to use when passing a CQmodel object:

table

Name of the RMP table that for which the fit will be plotted. By default fitgraph will plot the first RMP table of the CQmodel object, this argument overrides this default.

fit.type

Type of fit estimate that will be used, it can be W for Weighted Fit (i.e. Infit, the default), or U for Unweighted Fit (i.e. Outfit). Called type in previous versions; use of that parameter is deprecated to avoid collision with the type parameter in the link{plot} function.

Author

David Torres Irribarra and Rebecca Freund.

References

Wilson, M. (2005). Constructing measures: An item response modeling approach.

Examples

Run this code

# Generating mock data
sampleLabels <- paste('item',1:10)

fitBounds <- (abs(rnorm(10, mean = 0, sd = .05)) * 2)
fitEst <- rnorm(10, mean = 1, sd = .1)

fitLB <- 1 - fitBounds
fitUB <- 1 + fitBounds
par("mar")
# running fitgraph
fitgraph(fitEst,fitLB,fitUB,itemLabels=sampleLabels)

#From ConQuest output:
	
	fpath <- system.file("extdata", package="WrightMap")

	fitgraph(file.path(fpath,"ex2.shw"))



Run the code above in your browser using DataLab