ipsatize: Ipsatize circumplex items using deviation scoring across...

View source: R/tidying_functions.R

ipsatizeR Documentation

Ipsatize circumplex items using deviation scoring across variables

Description

Rescore each circumplex item using deviation scoring across variables. In other words, subtract each observation's mean response from each response. This effectively removes the presence of a general factor, which can make certain circumplex fit analyses more powerful.

Usage

ipsatize(data, items, na.rm = TRUE, prefix = "", suffix = "_i", append = TRUE)

Arguments

data

Required. A data frame or matrix containing at least circumplex scales.

items

Required. A character vector containing the column names, or a numeric vector containing column indexes, of item variables in data to be ipsatized.

na.rm

Optional. A logical that determines whether missing values should be ignored during the calculation of the mean during ipsatization (default = TRUE).

prefix

Optional. A string that will be added to the start of each items name in the output (default = "").

suffix

Optional. A string that will be added to the end of each items name in the output (default = "_i").

append

Optional. A logical that determines whether to append the ipsatized scores to data in the output or just return the ipsatized scores alone (default = TRUE).

Value

A data frame that matches data except that the variables specified in items have been rescored using ipsatization.

See Also

Other tidying functions: norm_standardize(), score()

Examples

data("raw_iipsc")
ipsatize(raw_iipsc, items = 1:32)
ipsatize(raw_iipsc, items = sprintf("IIP%02d", 1:32))

circumplex documentation built on Oct. 28, 2024, 9:06 a.m.