extractGroup: Extract single group mirt object from a multiple group one

View source: R/extractGroup.R

extractGroupR Documentation

Extract single group mirt object from a multiple group one

Description

This is function is essentially a wrapper for the function extract.group from the mirt package but ensures that extracted object retains a few pieces of information that are need by most of the interactive apps. It may be useful when IRT models have been fitted using multiple group methods (perhaps to help impose various constraints on parameters across groups) but we wish to be able to interactively view the results within particular groups.

Usage

extractGroup(multgroupobj, group)

Arguments

multgroupobj

An object of returned from multipleGroup.

group

A character string specifying the name of the group to be extracted (e.g., "group1"), or a numeric value specifying the index of the group to be extracted (i.e., 1 will extract the first group in the object).

Examples

## Not run: 
groups=c(rep("grp1",200),rep("grp2",200))
mg1=multipleGroup(mathsdata[1:400,1:10],1,groups)

# Extract group 1 using character string naming group
mirt1=extractGroup(mg1,"grp1")

# Extract group 2 using numeric index
mirt2=extractGroup(mg1,2)

runResultsApp()

## End(Not run)

CambridgeAssessmentResearch/unimirt documentation built on June 10, 2025, 6:03 a.m.