From the course: R Essential Training Part 2: Modeling Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating contingency tables
From the course: R Essential Training Part 2: Modeling Data
Creating contingency tables
- [Instructor] When your data consists of categories, nominal or sometimes called discrete variables, you usually want to use something different from a correlation coefficient and a contingency table or a cross tabulation is a very common way of looking at that. I want to show you how to do these in R. Let's start by loading a few packages, and then I went to load the state data, the Google search terms dataset, except this time we're not going to look at the search terms, we're going to look at the factors, and that's psych regions and region of the United States, and I'm going to pull those out. I'm also going to convert them from character variables to factors. And then I'm going to do this one other little thing. The psych regions have really long labels, friendly and conventional, temperamental and uninhibited, and that actually makes the table hard to read because they're so long. I'm going to use factor recode…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Computing frequencies4m 54s
-
(Locked)
Computing descriptive statistics9m 42s
-
(Locked)
Computing correlations6m 32s
-
(Locked)
Creating contingency tables5m 35s
-
(Locked)
Conducting a principal component analysis13m
-
(Locked)
Conducting an item analysis17m 23s
-
(Locked)
Conducting a confirmatory factor analysis5m 50s
-
(Locked)
-
-
-
-