Skip to contents

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, overwrite = FALSE)

Arguments

.data

Required. A data frame containing at least circumplex scales.

items

Required. The variable names or column numbers for the variables in .data that contain circumplex items 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).

overwrite

Optional. A logical that determines whether the variables specified in items should be overwritten with ipsatized versions or alternatively preserved and new variables ending with "_i" should be added to the data frame (default = FALSE).

Value

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

See also

Other tidying functions: score(), standardize()

Examples

data("raw_iipsc")
ipsatize(raw_iipsc, IIP01:IIP32)
#> # A tibble: 10 × 64
#>    IIP01 IIP02 IIP03 IIP04 IIP05 IIP06 IIP07 IIP08 IIP09 IIP10 IIP11 IIP12 IIP13
#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1     0     0     0     0     1     0     1     0     2     1     0     0     0
#>  2     1     1     0     0     3     2     2     1     0     1     0     1     4
#>  3     1     0     1     0     1     1     1     3     0     1     0     0     2
#>  4     3     2     3    NA     2     3     2     3     2     3     2     4     2
#>  5     0     0     0     1     0     0     1     1     0     1     0     2     1
#>  6     0     0     0     0     0     0     1     1     0     0     0     0     0
#>  7     1     0     0     0     2     1     1     0     1     0     0     0     1
#>  8     1     0     1     0     1     1     2     1     1     0     0     0     1
#>  9     0     0     2     2     0     1     3     0     1     0     1     1     0
#> 10     0     0     0     0     0     0     2     0     0     0     0     0     0
#> # ℹ 51 more variables: IIP14 <dbl>, IIP15 <dbl>, IIP16 <dbl>, IIP17 <dbl>,
#> #   IIP18 <dbl>, IIP19 <dbl>, IIP20 <dbl>, IIP21 <dbl>, IIP22 <dbl>,
#> #   IIP23 <dbl>, IIP24 <dbl>, IIP25 <dbl>, IIP26 <dbl>, IIP27 <dbl>,
#> #   IIP28 <dbl>, IIP29 <dbl>, IIP30 <dbl>, IIP31 <dbl>, IIP32 <dbl>,
#> #   IIP01_i <dbl>, IIP02_i <dbl>, IIP03_i <dbl>, IIP04_i <dbl>, IIP05_i <dbl>,
#> #   IIP06_i <dbl>, IIP07_i <dbl>, IIP08_i <dbl>, IIP09_i <dbl>, IIP10_i <dbl>,
#> #   IIP11_i <dbl>, IIP12_i <dbl>, IIP13_i <dbl>, IIP14_i <dbl>, …