ipsatize: Ipsatize Data

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Returns a data.frame after ipsatizing (standardizing the rows)

Usage

1
ipsatize(set)

Arguments

set

A data.frame to be ipsatized

Details

In research it is frequently desired to standardize the rows of a data.frame rather than the columns. This function does just that.

Value

Returns a data.frame of the same dimensions as 'set' that contains ipsatized values

Author(s)

Ryne A. Sherman

See Also

reQ

Examples

1
2
3
4
5
data(bfi.set)
#Lets ipsatize (within-person standardize) the Big Five Inventory (BFI)
head(bfi.set)
ip.bfi.set <- ipsatize(bfi.set)
head(ip.bfi.set)

Example output

Loading required package: psych
Loading required package: abind
Loading required package: foreach
  sBFI1 sBFI2 sBFI3 sBFI4 sBFI5 sBFI6 sBFI7 sBFI8 sBFI9 sBFI10 sBFI11 sBFI12
1     5     2     4     3     5     1     4     4     2      5      4      3
2     4     1     5     1     4     3     5     3     5      5      5      1
3     3     2     4     4     4     4     4     3     5      5      2      1
4     4     3     4     3     5     3     4     3     2      5      4      3
5     3     2     5     2     3     2     5     4     2      5      4      1
6     5     2     4     3     4     3     4     2     4      5      4      2
  sBFI13 sBFI14 sBFI15 sBFI16 sBFI17 sBFI18 sBFI19 sBFI20 sBFI21 sBFI22 sBFI23
1      5      4      4      4      5      4      4      5      1      5      3
2      5      1      4      5      5      4      3      5      4      5      1
3      4      4      5      3      5      4      5      5      4      5      4
4      4      5      5      4      3      2      4      5      3      4      3
5      5      4      3      4      5      2      4      4      3      5      4
6      5      3      4      4      4      2      4      5      2      4      4
  sBFI24 sBFI25 sBFI26 sBFI27 sBFI28 sBFI29 sBFI30 sBFI31 sBFI32 sBFI33 sBFI34
1      4      4      4      1      2      4      4      1      4      5      4
2      4      4      3      1      5      2      4      5      5      4      5
3      2      3      3      4      4      3      3      4      4      4      5
4      2      5      3      3      3      4      5      4      4      5      2
5      5      1      4      1      4      4      4      4      5      4      2
6      4      4      4      2      4      4      5      2      5      5      3
  sBFI35 sBFI36 sBFI37 sBFI38 sBFI39 sBFI40 sBFI41 sBFI42 sBFI43 sBFI44
1      5      5      3      2      3      3      2      4      4      5
2      3      4      4      4      3      4      1      4      1      3
3      3      2      1      3      4      4      4      4      5      3
4      4      3      2      4      4      4      2      4      4      5
5      1      4      2      2      5      5      4      5      4      2
6      2      5      1      5      2      4      1      4      4      5
    sBFI1.ip   sBFI2.ip  sBFI3.ip   sBFI4.ip   sBFI5.ip   sBFI6.ip  sBFI7.ip
1  1.1282762 -1.3132395 0.3144376 -0.4994009  1.1282762 -2.1270781 0.3144376
2  0.3039708 -1.8078265 1.0079032 -1.8078265  0.3039708 -0.3999616 1.0079032
3 -0.6317798 -1.5903422 0.3267827  0.3267827  0.3267827  0.3267827 0.3267827
4  0.3580574 -0.6922444 0.3580574 -0.6922444  1.4083593 -0.6922444 0.3580574
5 -0.3656185 -1.1316762 1.1664971 -1.1316762 -0.3656185 -1.1316762 1.1664971
6  1.2003248 -1.3552054 0.3484814 -0.5033620  0.3484814 -0.5033620 0.3484814
    sBFI8.ip   sBFI9.ip sBFI10.ip  sBFI11.ip  sBFI12.ip sBFI13.ip  sBFI14.ip
1  0.3144376 -1.3132395  1.128276  0.3144376 -0.4994009 1.1282762  0.3144376
2 -0.3999616  1.0079032  1.007903  1.0079032 -1.8078265 1.0079032 -1.8078265
3 -0.6317798  1.2853451  1.285345 -1.5903422 -2.5489047 0.3267827  0.3267827
4 -0.6922444 -1.7425462  1.408359  0.3580574 -0.6922444 0.3580574  1.4083593
5  0.4004393 -1.1316762  1.166497  0.4004393 -1.8977340 1.1664971  0.4004393
6 -1.3552054  0.3484814  1.200325  0.3484814 -1.3552054 1.2003248 -0.5033620
   sBFI15.ip  sBFI16.ip  sBFI17.ip  sBFI18.ip  sBFI19.ip sBFI20.ip  sBFI21.ip
1  0.3144376  0.3144376  1.1282762  0.3144376  0.3144376 1.1282762 -2.1270781
2  0.3039708  1.0079032  1.0079032  0.3039708 -0.3999616 1.0079032  0.3039708
3  1.2853451 -0.6317798  1.2853451  0.3267827  1.2853451 1.2853451  0.3267827
4  1.4083593  0.3580574 -0.6922444 -1.7425462  0.3580574 1.4083593 -0.6922444
5 -0.3656185  0.4004393  1.1664971 -1.1316762  0.4004393 0.4004393 -0.3656185
6  0.3484814  0.3484814  0.3484814 -1.3552054  0.3484814 1.2003248 -1.3552054
  sBFI22.ip  sBFI23.ip  sBFI24.ip  sBFI25.ip  sBFI26.ip  sBFI27.ip  sBFI28.ip
1 1.1282762 -0.4994009  0.3144376  0.3144376  0.3144376 -2.1270781 -1.3132395
2 1.0079032 -1.8078265  0.3039708  0.3039708 -0.3999616 -1.8078265  1.0079032
3 1.2853451  0.3267827 -1.5903422 -0.6317798 -0.6317798  0.3267827  0.3267827
4 0.3580574 -0.6922444 -1.7425462  1.4083593 -0.6922444 -0.6922444 -0.6922444
5 1.1664971  0.4004393  1.1664971 -1.8977340  0.4004393 -1.8977340  0.4004393
6 0.3484814  0.3484814  0.3484814  0.3484814  0.3484814 -1.3552054  0.3484814
   sBFI29.ip  sBFI30.ip  sBFI31.ip sBFI32.ip sBFI33.ip  sBFI34.ip  sBFI35.ip
1  0.3144376  0.3144376 -2.1270781 0.3144376 1.1282762  0.3144376  1.1282762
2 -1.1038940  0.3039708  1.0079032 1.0079032 0.3039708  1.0079032 -0.3999616
3 -0.6317798 -0.6317798  0.3267827 0.3267827 0.3267827  1.2853451 -0.6317798
4  0.3580574  1.4083593  0.3580574 0.3580574 1.4083593 -1.7425462  0.3580574
5  0.4004393  0.4004393  0.4004393 1.1664971 0.4004393 -1.1316762 -1.8977340
6  0.3484814  1.2003248 -1.3552054 1.2003248 1.2003248 -0.5033620 -1.3552054
   sBFI36.ip  sBFI37.ip  sBFI38.ip  sBFI39.ip  sBFI40.ip  sBFI41.ip sBFI42.ip
1  1.1282762 -0.4994009 -1.3132395 -0.4994009 -0.4994009 -1.3132395 0.3144376
2  0.3039708  0.3039708  0.3039708 -0.3999616  0.3039708 -1.8078265 0.3039708
3 -1.5903422 -2.5489047 -0.6317798  0.3267827  0.3267827  0.3267827 0.3267827
4 -0.6922444 -1.7425462  0.3580574  0.3580574  0.3580574 -1.7425462 0.3580574
5  0.4004393 -1.1316762 -1.1316762  1.1664971  1.1664971  0.4004393 1.1664971
6  1.2003248 -2.2070488  1.2003248 -1.3552054  0.3484814 -2.2070488 0.3484814
   sBFI43.ip  sBFI44.ip
1  0.3144376  1.1282762
2 -1.8078265 -0.3999616
3  1.2853451 -0.6317798
4  0.3580574  1.4083593
5  0.4004393 -1.1316762
6  0.3484814  1.2003248

multicon documentation built on May 2, 2019, 3:18 a.m.