fitgraph: Item Fit Graphs

View source: R/fitgraph.R

fitgraphR Documentation

Item Fit Graphs

Description

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

Usage


## Default S3 method:
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 class '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 class 'CQmodel'
fitgraph(fitEst, table = NULL, fit.type = "W", itemLabels = NULL, ...)
## S3 method for class '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(s)

David Torres Irribarra and Rebecca Freund.

References

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

Examples


# 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"))




david-ti/wrightmap documentation built on May 24, 2022, 3:53 p.m.