Skip to contents

Removes named items and refits the analysis with the same model specification.

Usage

drop_items(fit, items, boot_reps = NULL)

Arguments

fit

A fitted object from rasch or rasch_efrm. Many-facet fits are refused: remove the item's rows from the long-format data and refit rasch_mfrm instead.

items

Item names to remove.

boot_reps

Bootstrap replicates for an EFRM refit. The default retains the fitted specification; a number overrides it.

Value

A refitted object of the same class as fit, carrying a note recording which items were dropped. Split-item provenance is retained for the items that remain.

Details

The refit retains person identifiers and factors, class-interval settings, optimisation controls, anchors, multiple-choice scoring and PCM component constraints. An EFRM refit also retains the item-set and crossed-frame design, linking controls and uncertainty method. The operation is refused if it would remove an externally anchored item, empty an item set or leave the model unidentified. To change the anchor set, refit explicitly; this prevents an item-removal comparison from silently changing its scale. Older anchored or component-constrained fits without their original refit settings must first be refitted from the source data. A refit is also refused if it drops or rescores a retained item because a response category no longer contributes conditional information.

Item removal changes both the item calibration and the person estimates. For an EFRM it can also change the estimated frame units. Compare the original and refitted results as a sensitivity analysis.

See also

frame_invariance and resolve_frames for frame models; split_items and resolve_dif for DIF; and combine_items for response dependence.

Examples

d <- simulate_rasch(300, 8, seed = 1)
fit <- rasch(d, id = "id")
fit2 <- drop_items(fit, "I03")
nrow(fit2$items)
#> [1] 7