1. Learn
  2. /
  3. Courses
  4. /
  5. Analyzing Survey Data in R

Exercise

Creating contingency tables

Let's practice constructing contingency tables with svytable(). HealthGen is a categorical variable of the participant's self-reported health for participants aged 12 years and older. Let's look at the relationship between HealthGen and Depressed.

Instructions 1/3

undefined XP
  • 1

    Reconstruct and display a frequency table of the variable Depressed using the table name tab_D.

  • 2

    Construct and display a frequency table of the variable HealthGen using the table name tab_H.

  • 3

    Construct and display a contingency table of the variables Depressed and HealthGen using the table name tab_DH.