extract.group: Extract a group from a multiple group mirt object

Description Usage Arguments Author(s) References See Also Examples

View source: R/extract.group.R

Description

Extract a single group from an object defined by multipleGroup.

Usage

1

Arguments

x

mirt model of class 'MultipleGroupClass'

group

a number signifying which group should be extracted

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

See Also

extract.item, extract.mirt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
set.seed(12345)
a <- matrix(abs(rnorm(15,1,.3)), ncol=1)
d <- matrix(rnorm(15,0,.7),ncol=1)
itemtype <- rep('2PL', nrow(a))
N <- 1000
dataset1 <- simdata(a, d, N, itemtype)
dataset2 <- simdata(a, d, N, itemtype, mu = .1, sigma = matrix(1.5))
dat <- rbind(dataset1, dataset2)
group <- c(rep('D1', N), rep('D2', N))
models <- 'F1 = 1-15'

mod_configural <- multipleGroup(dat, models, group = group)
group.1 <- extract.group(mod_configural, 1) #extract first group
summary(group.1)
plot(group.1)

## End(Not run)

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