Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.din

Plot Method for Objects of Class din


Description

S3 method to plot objects of the class din.

Usage

## S3 method for class 'din'
plot(x, items=c(1:ncol(x$data)), pattern="",
    uncertainty=0.1, top.n.skill.classes=6, pdf.file="",
    hide.obs=FALSE, display.nr=1:4, ask=TRUE, ...)

Arguments

x

A required object of class din, obtained from a call to the function din.

items

An index vector giving the items to be visualized in the first plot, see ‘Details’. The default is items=c(1:ncol(x$data)), which is all items.

pattern

An optional character or a numeric vector specifying a response pattern of an respondent, whose attributes are analyzed in a separate graphic. It is required to choose a pattern from the empirical data set (see Example).

uncertainty

A numeric between 0 and 0.5 giving the uncertainty bounds for deriving the observed skill occurrence probabilities in plot 2 and the simplified deterministic attribute profiles in plot 4.

top.n.skill.classes

A numeric, specifying the number of skill classes, starting with the most frequent, to be labeled in plot 3. Default value is 6.

pdf.file

An optional character string. If specified the graphics obtained from the function plot.din are provided in a pdf file. The default is pdf.file="", which is not providing a pdf file. Otherwise specify a directory and filename ending with .pdf where to write the document.

hide.obs

An optional logical value. If set to TRUE, the polygonal chain for observed frequencies of skill class probabilities in the second graphic is not displayed.

display.nr

An optional numeric or numeric vector. If specified, only the plots in display.nr are displayed. Default is display.nr=1:4 causing the display of all four plots.

ask

An optional logical indicating whether a request for a user input is necessary before the next figure is drawn.

...

Optional graphical parameters to be passed to or from other methods will be ignored.

Details

The plot method graphs the results obtained from a CDM analysis. Four graphics to analyze the fitted model are produced, respectively.

The first graphic depicts the parameter estimates their diagnostic accuracy for each of chosen the items in items. Parameter estimates are splitted in guessing and slipping errors for each item. See din for further information.

The second graphic shows the estimated occurrence probabilities of the attributes underlying the items.

The third graphic illustrates the distribution of the skill class occurrence probabilities. The
top.n.skill.classes most frequent skill classes are labeled.

The forth plot is a parallel coordinate plot of the individual skill profiles. Each line represents an individual skill profile. For each of these skill profiles on the vertical lines the individual probabilities of mastering the corresponding attributes are drawn.

If in pattern an empirical response pattern is specified, the fifth plot shows the individual skill profile of an examinee having this response pattern. For each attribute, having a mastering probability below 0.5 - uncertainty the examinee is classified as non-master of the corresponding attribute. For mastering probabilities higher than 0.5 + uncertainty the examinee is classified as master of the corresponding attribute.

Value

If the argument x is of required type, and if the optional arguments items, uncertainty,
top.n.skill.classes and pdf.file are specified as required, the plot.din produces several graphics to analyze a CDM model.

See Also

print.din, the S3 method for printing objects of the class din; summary.din, the S3 method for summarizing objects of the class din, which creates objects of the class summary.din; print.summary.din, the S3 method for printing objects of the class summary.din; din, the main function for DINA and DINO parameter estimation, which creates objects of the class din. See also CDM-package for general information about this package.

Examples

##
## (1) examples based on dataset fractions.subtraction.data
##

data(fraction.subtraction.data)
data(fraction.subtraction.qmatrix)

## Fix the guessing parameters of items 5, 8 and 9 equal to .20
# define a constraint.guess matrix
constraint.guess <-  matrix(c(5,8,9, rep(0.2, 3)), ncol=2)
fractions.dina.fixed <- CDM::din(data=fraction.subtraction.data,
  q.matrix=fraction.subtraction.qmatrix,
  constraint.guess=constraint.guess)

## The second plot shows the expected (MAP) and observed skill
## probabilities. The third plot visualizes the skill class
## occurrence probabilities; Only the 'top.n.skill.classes' most frequent
## skill classes are labeled; it is obvious that the skill class '11111111'
## (all skills are mastered) is the most probable in this population.
## The fourth plot shows the skill probabilities conditional on response
## patterns; in this population the skills 3 and 6 seem to be
## mastered easier than the others. The fifth plot shows the
## skill probabilities conditional on a specified response
## pattern; it is shown whether a skill is mastered (above
## .5+'uncertainty') unclassifiable (within the boundaries) or
## not mastered (below .5-'uncertainty'). In this case, the
## 527th respondent was chosen; if no response pattern is
## specified, the plot will not be shown (of course)
pattern <- paste(fraction.subtraction.data[527, ], collapse="")
plot(fractions.dina.fixed, pattern=pattern, display.nr=4)

# It is also possible to input a vector of item responses
plot(fractions.dina.fixed, pattern=fraction.subtraction.data[527, ],display.nr=4)

#uncertainty=0.1, top.n.skill.classes=6 are default
plot(fractions.dina.fixed, uncertainty=0.1, top.n.skill.classes=6,
  pattern=pattern)

CDM

Cognitive Diagnosis Modeling

v7.5-15
GPL (>= 2)
Authors
Alexander Robitzsch [aut, cre], Thomas Kiefer [aut], Ann Cathrice George [aut], Ali Uenlue [aut]
Initial release
2020-03-10 14:19:21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.