Learn R Programming

pairwise (version 0.2.2)

grm: Graphical Model Check

Description

This function makes the basic calculations for the graphical model check for dicho- or polytomous itemresponse formats. It is more or less a wraper function, internaly calling the function pairSE. Several splitting options are available (see arguments).

Usage

grm(daten, m = NULL, teil = "random", splitseed = "no",
    verbose = TRUE, ...)

Arguments

daten
daten a data matrix with optionaly named colums (names of items) or a data.frame, potentially with missing values, comprising polytomous responses of respondents (rows) on some items (colums) coded starting with 0 for lowest category to m
m
number of response categories for all items - by default m is defined as m = max(daten,na.rm=TRUE)+1.
teil
Specifies the splitting criterion. Basicly there are three different options available - each with several modes - which are controlled by passing the corresponding character expression to the argument.

1) Using the rawscore for splitting into su

splitseed
numeric, used for set.seed(splitseed) for random splitting - see argument teil
verbose
logical, if verbose = TRUE (default) a message about subsampling whe calculation standrderrors is sent to console
...
additional arguments nsample, size, seed, pot for caling pairSE are passed through - see description for pairSE<

Value

  • A (list) object of class "grm" containing the item difficulty parameter sigma and their standard errors for two or more subsamples.

A Note on Standard Errors

Estimation of standard errors is done by repeated calculation of item parameters for subsamples of the given data. This procedure is mainly controlled by the arguments nsample and size (see arguments). With regard to calculation time, the argument nsample is the 'time killer'. On the other hand, things (estimation of standard errors) will not necessarily get better when choosing large values for nsample. For example choosing nsample=400 will only result in minimal change for standard error estimation in comparison to (nsample=30) which is the default setting (see examples).

Details

The data is splitted in two or more subsamples and then item thresholds, the parameter (Sigma) and their standard errors (SE) for the items according the PCM are calculatetd for each subsample. Additional arguments (see description of function pairSE) for parameter calculation are passed through.

WARNING: When using data based on booklet designs with systematically missing values (by design) you have to ensure that in each of the booklet the maximum raw value to reach is equal while using the raw value as splitting criterion.

References

description of function pairSE{pairwise}.

Examples

Run this code
data(bfiN) # loading example data set

# calculating itemparameters and SE for two random allocated subsamples
grm<-grm(daten=bfiN, teil = "random")

summary(grm)

# some examples for plotting options
# plotting item difficulties for two subsamples against each other
# with elipses for a CI = 95\% .
plot(grm)

# using triangles as plotting pattern
plot(grm,pch=2)

#plotting without CI ellipses
plot(grm,ci=0,pch=2)

# plotting with item names
plot(grm,itemNames=TRUE)

# Changing the size of the item names
plot(grm,itemNames=TRUE, cex.names = 1.3)

# Changing the color of the CI ellipses
plot(grm,itemNames=TRUE, cex.names = .8, col.error="green")

###### example from details section 'Some Notes on Standard Errors' ########
grm<-grm(daten=bfiN, teil = "random",splitseed=13)
plot(grm)
######
grm_400<-grm(daten=bfiN, teil = "random", splitseed=13 ,nsample=400)
plot(grm_400)

Run the code above in your browser using DataLab