add_item_associations_with_criterion_var | R Documentation |
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.
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
)
.item_data |
A data frame with item data from |
.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. |
The input data frame with added columns for the correlation with the criterion variable and the incremental R if control variables are given.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.