designMatrices: Generation of Design Matrices

View source: R/designMatrices.R

designMatricesR Documentation

Generation of Design Matrices

Description

Generate design matrices, and display them at console.

Usage

designMatrices(modeltype=c("PCM", "RSM"), maxKi=NULL, resp=resp,
    ndim=1, A=NULL, B=NULL, Q=NULL, R=NULL, constraint="cases",...)

## S3 method for class 'designMatrices'
print(x, ...)

designMatrices.mfr(resp, formulaA=~ item + item:step, facets=NULL,
    constraint=c("cases", "items"), ndim=1, Q=NULL, A=NULL, B=NULL,
    progress=FALSE)
designMatrices.mfr2(resp, formulaA=~ item + item:step, facets=NULL,
    constraint=c("cases", "items"), ndim=1, Q=NULL, A=NULL, B=NULL,
    progress=FALSE)

.A.matrix(resp, formulaA=~ item + item*step, facets=NULL,
    constraint=c("cases", "items"), progress=FALSE, maxKi=NULL)
rownames.design(X)

.A.PCM2( resp, Kitem=NULL, constraint="cases", Q=NULL)
   # generates ConQuest parametrization of partial credit model

.A.PCM3( resp, Kitem=NULL ) # parametrization for A matrix in the dispersion model

Arguments

modeltype

Type of item response model. Until now, the partial credit model (PCM; 'item+item*step') and the rating scale model (RSM; 'item+step') is implemented.

maxKi

A vector containing the maximum score per item

resp

Data frame of item responses

ndim

Number of dimensions

A

The design matrix for linking item category parameters to generalized item parameters \xi.

B

The scoring matrix of item categories on \theta dimensions.

Q

A loading matrix of items on dimensions with number of rows equal the number of items and the number of columns equals the number of dimensions in the item response model.

R

This argument is not used

x

Object generated by designMatrices. This argument is used in print.designMatrices and rownames.design.

X

Object generated by designMatrices. This argument is used in print.designMatrices and rownames.design.

formulaA

An R formula object for generating the A design matrix. Variables in formulaA have to be included in facets.

facets

A data frame with observed facets. The number of rows must be equal to the number of rows in resp.

constraint

Constraint in estimation: cases assumes zero means of trait distributions and items a sum constraint of zero of item parameters

Kitem

Maximum number of categories per item

progress

Display progress for creation of design matrices

...

Further arguments

Details

The function .A.PCM2 generates the Conquest parametrization of the partial credit model.

The function .A.PCM3 generates the parametrization for the A design matrix in the dispersion model for ordered data (Andrich, 1982).

Note

The function designMatrices.mfr2 handles multi-faceted design for items with differing number of response options.

References

Andrich, D. (1982). An extension of the Rasch model for ratings providing both location and dispersion parameters. Psychometrika, 47(1), 105-113. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02293856")}

See Also

See data.sim.mfr for some examples for creating design matrices.

Examples

###########################################################
# different parametrizations for ordered data
data( data.gpcm )
resp <- data.gpcm

# parametrization for partial credit model
A1 <- TAM::designMatrices( resp=resp )$A
# item difficulty and threshold parametrization
A2 <- TAM::.A.PCM2( resp )
# dispersion model of Andrich (1982)
A3 <- TAM::.A.PCM3( resp )
# rating scale model
A4 <- TAM::designMatrices( resp=resp, modeltype="RSM" )$A

TAM documentation built on May 29, 2024, 2:20 a.m.