Recommend Documents

You see, this room that Sean was talking to was part of a somewhat ... bin with an ashtray at the base of the wall to accommodate the habit. .... were most likely having two different conversations - one each. ...... shut the sunglass container and b

describe() - Use describe(x = bfi) # the data set You can also put part of the data set in here, like only some of the variables or some of the rows. describe(x = bfi[,c("gender","education","age")]) describe(x = bfi[1:50, ]) Finally, you can speed up the function by showing only some of the variables. describe(x = bfi, fast=TRUE) # argument to calculate limited number

scrub only takes a data frame and outputs a data frame. Make sure you name your output. I often replace the original data with the cleaned data:

bfi
I

I

the argument “where” can take either names or locations of variables. If you use names, make sure you put quotes around them. scrub will not always work if you ask it to replace a value that does not exist.

scrub() - other functions

reverse.code() will reverse code items in a scale. Requires a key vector.

pairs.panels - motivation

Scatter Plot of Matrices Graphically display several variables and their relationships to one another. Great for posters!

pairs.panels - use

pairs.panels(x = iris[,1:4]) # data set

pairs.panels - example 2.5

3.0

3.5

4.0

0.5

1.0

1.5

2.0

2.5

4.5

5.5

0.87 0.82

−0.12

6.5

7.5

2.0

Sepal.Length

2.0 2.5 3.0 3.5 4.0

Sepal.Width

7

−0.43 −0.37

0.5 1.0 1.5 2.0 2.5

4 3 2 1

0.96

5

6

Petal.Length

Petal.Width

4.5

5.0

5.5

6.0

6.5

7.0

7.5

8.0

1

2

3

4

5

6

7

pairs.panels - tips

I I

This function is quickly overwhelmed. Limit each plot to only a few variables. I recommend no more than 8. Don’t use binary or factor-level variables. The plots are difficult to interpret, and there are easier ways to display those data and their relationships.

pairs.panels - other functions

I

violinBy is a great way to show the relationship between several continuous variable and a factor variables.

Scores are saved in the scores part of the object scores$scores To add them to your data set: bfi
scoreItems - tips

I I

Double and triple check your keys list. They’re easy to mess up. If your dataset has factor-level variables, scoreItems will not work at all. Even if those variables are not part of your scales. The easiest fix is to copy the scale items into a new data set, and perform the functions on that data set.

scaleItems
scoreItems - other functions

I

scoreOverlap is useful if you have scales which share items. This function can report the correlations between scales corrected for item overlap.

alpha - motivation

Calculate Cronbach’s alpha (and other measures of reliability) for a set of items.