add_item_associations_with_criterion_var: Calculate item associations with a criterion variable

View source: R/mirt.R

add_item_associations_with_criterion_varR Documentation

Calculate item associations with a criterion variable

Description

For using Jensen's method, one needs to calculate the correlation between each item and the criterion variable. This function does that, and also calculates the incremental R for each item if control variables are given.

Usage

add_item_associations_with_criterion_var(
  .item_data,
  .data,
  criterion_var,
  control_vars = NULL,
  reverse_negative_loadings = T,
  winsorize_r2_adj = T,
  use_criterion_name = T
)

Arguments

.item_data

A data frame with item data from get_mirt_stats()

.data

A data frame with the case-level data. Must have the items, the criterion variable, and any control variables.

criterion_var

The name of the criterion variable

control_vars

A vector of names of control variables to use in linear regression.

reverse_negative_loadings

Whether to reverse the sign of the loadings, correlations, and model incremental R if the loading is negative. Default is TRUE.

winsorize_r2_adj

Whether to winsorize the incremental R2 values to avoid negative values (probelmatic with square root transformation). Default is TRUE.

Value

The input data frame with added columns for the correlation with the criterion variable and the incremental R if control variables are given.


Deleetdk/kirkegaard documentation built on June 8, 2025, 4:09 a.m.