Skip to contents

Takes items out of the named scales or models, and out of any plan block role that lists them with other variables, such as the item list of a reliability or factor analysis block. The questions stay in the instrument and their answers stay in the data. Nothing is recorded: record the change with amend_sframe(), where a change to how a scale is scored is a design-tier amendment and needs a deviation report.

Usage

sframe_drop_items(instrument, items, from)

Arguments

instrument

An sframe object.

items

Character. The item ids to drop.

from

Character. The ids of the scales or models to drop them from.

Value

The changed sframe object, with a message of class sframe_drop_items_message saying what changed.

Details

A role that names only the dropped item, such as the variable of a frequency table, keeps it, since that block analyses the item itself. A scale's reverse keys and weights follow its items, and a dropped item no longer names the scale (scale_id) or carries its reverse flag. A model drops the item from every construct that measures it.

See also

sframe_item_flags() to find the items past the usual cut-offs, amend_sframe() to record the drop.

Other Amendments functions: amend_sframe(), sframe_get_amendments(), sframe_item_flags(), sframe_link_git_commit()

Examples

ins <- sframe_demo("likert_scale")$instrument
revised <- sframe_drop_items(ins, "org_4", from = "organisation")
revised$scales[[1]]$items