expand.table: Expand summary table of patterns and frequencies

Description Usage Arguments Value Author(s) References Examples

View source: R/expand.table.R

Description

The expand.table function expands a summary table of unique response patterns to a full sized data-set. The response frequencies must be on the rightmost column of the input data.

Usage

1

Arguments

tabdata

An object of class data.frame or matrix with the unique response patterns and the number of frequencies in the rightmost column

sample

logical; randomly switch the rows in the expanded table? This does not change the expanded data, only the row locations

Value

Returns a numeric matrix with all the response patterns.

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com

References

Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. doi: 10.18637/jss.v048.i06

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(LSAT7)
head(LSAT7)
LSAT7full <- expand.table(LSAT7)
head(LSAT7full)

LSAT7full <- expand.table(LSAT7, sample = TRUE)
head(LSAT7full)


## End(Not run)

xzhaopsy/MIRT documentation built on May 29, 2019, 12:42 p.m.