Summarize basic response diagnostics in IRW data, including items with a single observed response category and sparse categories in polytomous items.
Arguments
- x
A data frame in long format with columns
id,item,resp, or the result ofirw_long2resp().- min_count
Minimum count for a category before it is considered sparse (only used when
xis long-format). Default is 5.- min_prop
Minimum within-item proportion for a category before it is considered sparse (only used when
xis long-format). Default is 0.01.
Value
A list with two elements:
single_category_items (character vector of item IDs) and
sparse_category_items (named list of data frames with columns
resp, count, prop).
Details
When x is long-format (with columns id, item, resp),
diagnostics are recomputed using min_count and min_prop. When
x is the wide-format result of irw_long2resp(), any attached
diagnostics from check_resp = TRUE are returned directly.
A response category is treated as "sparse" if it has fewer than
min_count observed responses OR a within-item proportion smaller than
min_prop.